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

Side by Side 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, 10 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 unified diff | Download patch
« no previous file with comments | « third_party/mongoose/README.chromium ('k') | third_party/mongoose/mongoose.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 diff --git a/third_party/mongoose/mongoose.c b/third_party/mongoose/mongoose.c 1 diff --git a/third_party/mongoose/mongoose.c b/third_party/mongoose/mongoose.c
2 --- a/third_party/mongoose/mongoose.c 2 --- a/third_party/mongoose/mongoose.c
3 +++ b/third_party/mongoose/mongoose.c 3 +++ b/third_party/mongoose/mongoose.c
4 @@ -23,7 +23,9 @@ 4 @@ -23,7 +23,9 @@
5 #else 5 #else
6 #define _XOPEN_SOURCE 600 // For flockfile() on Linux 6 #define _XOPEN_SOURCE 600 // For flockfile() on Linux
7 #define _LARGEFILE_SOURCE // Enable 64-bit file offsets 7 #define _LARGEFILE_SOURCE // Enable 64-bit file offsets
8 +#ifndef __STDC_FORMAT_MACROS 8 +#ifndef __STDC_FORMAT_MACROS
9 #define __STDC_FORMAT_MACROS // <inttypes.h> wants this for C++ 9 #define __STDC_FORMAT_MACROS // <inttypes.h> wants this for C++
10 +#endif // __STDC_FORMAT_MACROS 10 +#endif // __STDC_FORMAT_MACROS
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 101
102 @@ -3867,7 +3865,7 @@ static void handle_proxy_request(struct mg_connection *con n) { 102 @@ -3867,7 +3865,7 @@ static void handle_proxy_request(struct mg_connection *con n) {
103 } 103 }
104 conn->peer->client.is_ssl = is_ssl; 104 conn->peer->client.is_ssl = is_ssl;
105 } 105 }
106 - 106 -
107 + 107 +
108 // Forward client's request to the target 108 // Forward client's request to the target
109 mg_printf(conn->peer, "%s %s HTTP/%s\r\n", ri->request_method, ri->uri + len, 109 mg_printf(conn->peer, "%s %s HTTP/%s\r\n", ri->request_method, ri->uri + len,
110 ri->http_version); 110 ri->http_version);
111 @@ -2820,6 +2820,8 @@ static void prepare_cgi_environment(struct mg_connection * conn,
112 blk->len = blk->nvars = 0;
113 blk->conn = conn;
114
115 + memset(&root, 0, sizeof(root));
116 +
117 get_document_root(conn, &root);
118
119 addenv(blk, "SERVER_NAME=%s", conn->ctx->config[AUTHENTICATION_DOMAIN]);
120 @@ -2916,6 +2918,8 @@ static void handle_cgi_request(struct mg_connection *conn, const char *prog) {
121 FILE *in, *out;
122 pid_t pid;
123
124 + memset(&ri, 0, sizeof(ri));
125 +
126 prepare_cgi_environment(conn, prog, &blk);
127
128 // CGI must be executed in its own directory. 'dir' must point to the
129
OLDNEW
« 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