An anonymous submitter filed bug #1299181

(http://curl.haxx.se/bug/view.cgi?id=1299181) that identified a silly problem
with Content-Range: headers with the 'bytes' keyword written in a different
case than all lowercase! It would cause a segfault!
This commit is contained in:
Daniel Stenberg
2005-09-27 09:13:39 +00:00
parent a2902de67c
commit b4c53e2cfd
3 changed files with 14 additions and 4 deletions

View File

@@ -880,11 +880,11 @@ CURLcode Curl_readwrite(struct connectdata *conn,
/* Content-Range: bytes [num]-
Content-Range: bytes: [num]-
The second format was added August 1st 2000 by Igor
Khristophorov since Sun's webserver JavaWebServer/1.1.1
obviously sends the header this way! :-( */
The second format was added since Sun's webserver
JavaWebServer/1.1.1 obviously sends the header this way!
*/
char *ptr = strstr(k->p, "bytes");
char *ptr = Curl_strcasestr(k->p, "bytes");
ptr+=5;
if(*ptr == ':')