new way to trick sws to return special data on CONNECT

This commit is contained in:
Daniel Stenberg 2003-11-24 16:12:41 +00:00
parent 15d41dfbcd
commit 2f9f843e8a
2 changed files with 11 additions and 0 deletions

View file

@ -350,6 +350,13 @@ static int get_request(int sock, int *part, int *open)
if(!strncmp(doc, "bad", 3))
/* if the host name starts with bad, we fake an error here */
test_no = DOCNUMBER_BADCONNECT;
else if(!strncmp(doc, "test", 4)) {
char *ptr = strchr(doc, ':');
if(ptr)
test_no = atoi(ptr+1);
else
test_no = DOCNUMBER_CONNECT;
}
else
test_no = DOCNUMBER_CONNECT;
}