mirror of
https://github.com/curl/curl.git
synced 2026-08-05 12:46:14 +03:00
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:
parent
e99a6b813e
commit
4a091bbd8a
4 changed files with 80 additions and 10 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue