mr Khristophorov added support for lame web servers sending bad range
headers...
This commit is contained in:
parent
c3c7739811
commit
e5c792d4e6
@ -375,11 +375,16 @@ _Transfer(struct connectdata *c_conn)
|
|||||||
if (strnequal("Content-Length", p, 14) &&
|
if (strnequal("Content-Length", p, 14) &&
|
||||||
sscanf (p+14, ": %ld", &contentlength))
|
sscanf (p+14, ": %ld", &contentlength))
|
||||||
conn->size = contentlength;
|
conn->size = contentlength;
|
||||||
else if (strnequal("Content-Range", p, 13) &&
|
else if (strnequal("Content-Range", p, 13)) {
|
||||||
sscanf (p+13, ": bytes %d-", &offset)) {
|
if (sscanf (p+13, ": bytes %d-", &offset) ||
|
||||||
if (data->resume_from == offset) {
|
sscanf (p+13, ": bytes: %d-", &offset)) {
|
||||||
/* we asked for a resume and we got it */
|
/* This second format was added August 1st by Igor
|
||||||
content_range = TRUE;
|
Khristophorov since Sun's webserver JavaWebServer/1.1.1
|
||||||
|
obviously sends the header this way! :-( */
|
||||||
|
if (data->resume_from == offset) {
|
||||||
|
/* we asked for a resume and we got it */
|
||||||
|
content_range = TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(data->cookies &&
|
else if(data->cookies &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user