Bug report #1204435 identified a problem with malformed URLs like

"http://somehost?data" as it added a slash too much in the request ("GET
/?data/"...). Added test case 260 to verify.
This commit is contained in:
Daniel Stenberg 2005-05-18 20:01:01 +00:00
parent e99a6b813e
commit 4a091bbd8a
4 changed files with 80 additions and 10 deletions

View file

@ -227,6 +227,10 @@ int ProcessRequest(struct httprequest *req)
ptr++; /* skip the slash */
/* skip all non-numericals following the slash */
while(*ptr && !isdigit(*ptr))
ptr++;
req->testno = strtol(ptr, &ptr, 10);
if(req->testno > 10000) {
@ -247,7 +251,7 @@ int ProcessRequest(struct httprequest *req)
if(!stream) {
logmsg("Couldn't open test file %d", req->testno);
req->open = FALSE; /* closes connection */
return 0;
return 1; /* done */
}
else {
char *cmd = NULL;