From 4a091bbd8a30685d4f676a023c0488abb0469d3f Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 18 May 2005 20:01:01 +0000 Subject: 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. --- tests/server/sws.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/server') 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; -- cgit v1.2.3