diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-05-18 20:01:01 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-05-18 20:01:01 +0000 |
commit | 4a091bbd8a30685d4f676a023c0488abb0469d3f (patch) | |
tree | f9ec0052df149bdf2771f534238c09c7f5a94eb8 /tests/server | |
parent | e99a6b813e18ecc23d77927a2b3c78372acdcb1e (diff) |
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.
Diffstat (limited to 'tests/server')
-rw-r--r-- | tests/server/sws.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/server/sws.c b/tests/server/sws.c index d5a80c851..df0a08da8 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -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; |