Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(465)

Unified Diff: third_party/mongoose/chrome-mongoose-modifications.diff

Issue 9309008: Initialized the variables root and ri. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased patch. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/mongoose/README.chromium ('k') | third_party/mongoose/mongoose.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/mongoose/chrome-mongoose-modifications.diff
diff --git a/third_party/mongoose/chrome-mongoose-modifications.diff b/third_party/mongoose/chrome-mongoose-modifications.diff
index 0f80a8b0360eb732e21efd2dbbc7130e5cab725d..b37162dd026f89eab431de9ba1cc4de7829ce816 100644
--- a/third_party/mongoose/chrome-mongoose-modifications.diff
+++ b/third_party/mongoose/chrome-mongoose-modifications.diff
@@ -108,3 +108,22 @@ diff --git a/third_party/mongoose/mongoose.c b/third_party/mongoose/mongoose.c
// Forward client's request to the target
mg_printf(conn->peer, "%s %s HTTP/%s\r\n", ri->request_method, ri->uri + len,
ri->http_version);
+@@ -2820,6 +2820,8 @@ static void prepare_cgi_environment(struct mg_connection *conn,
+ blk->len = blk->nvars = 0;
+ blk->conn = conn;
+
++ memset(&root, 0, sizeof(root));
++
+ get_document_root(conn, &root);
+
+ addenv(blk, "SERVER_NAME=%s", conn->ctx->config[AUTHENTICATION_DOMAIN]);
+@@ -2916,6 +2918,8 @@ static void handle_cgi_request(struct mg_connection *conn, const char *prog) {
+ FILE *in, *out;
+ pid_t pid;
+
++ memset(&ri, 0, sizeof(ri));
++
+ prepare_cgi_environment(conn, prog, &blk);
+
+ // CGI must be executed in its own directory. 'dir' must point to the
+
« no previous file with comments | « third_party/mongoose/README.chromium ('k') | third_party/mongoose/mongoose.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698