Fossil SCM

Fix an initialization error in the HTTP request header gathering logic.

drh 2013-08-03 23:27 UTC trunk
Commit 8c4158e40c17629b5979ae8cb202bd18bf072c0e
1 file changed +1 -1
+1 -1
--- src/cgi.c
+++ src/cgi.c
@@ -1185,11 +1185,11 @@
11851185
char zLine[2000]; /* A single line of input. */
11861186
g.fullHttpReply = 1;
11871187
if( fgets(zLine, sizeof(zLine),g.httpIn)==0 ){
11881188
malformed_request();
11891189
}
1190
- blob_zero(&g.httpHeader);
1190
+ g.httpHeader = empty_blob;
11911191
blob_append(&g.httpHeader, zLine, -1);
11921192
cgi_trace(zLine);
11931193
zToken = extract_token(zLine, &z);
11941194
if( zToken==0 ){
11951195
malformed_request();
11961196
--- src/cgi.c
+++ src/cgi.c
@@ -1185,11 +1185,11 @@
1185 char zLine[2000]; /* A single line of input. */
1186 g.fullHttpReply = 1;
1187 if( fgets(zLine, sizeof(zLine),g.httpIn)==0 ){
1188 malformed_request();
1189 }
1190 blob_zero(&g.httpHeader);
1191 blob_append(&g.httpHeader, zLine, -1);
1192 cgi_trace(zLine);
1193 zToken = extract_token(zLine, &z);
1194 if( zToken==0 ){
1195 malformed_request();
1196
--- src/cgi.c
+++ src/cgi.c
@@ -1185,11 +1185,11 @@
1185 char zLine[2000]; /* A single line of input. */
1186 g.fullHttpReply = 1;
1187 if( fgets(zLine, sizeof(zLine),g.httpIn)==0 ){
1188 malformed_request();
1189 }
1190 g.httpHeader = empty_blob;
1191 blob_append(&g.httpHeader, zLine, -1);
1192 cgi_trace(zLine);
1193 zToken = extract_token(zLine, &z);
1194 if( zToken==0 ){
1195 malformed_request();
1196

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button