mirror of
https://github.com/curl/curl.git
synced 2026-08-24 14:03:35 +03:00
new way to trick sws to return special data on CONNECT
This commit is contained in:
parent
15d41dfbcd
commit
2f9f843e8a
2 changed files with 11 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue