aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-08-02 07:15:41 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-08-02 07:15:41 +0000
commite5c792d4e63fc0d47175423617ca05b3b51d8879 (patch)
tree81b9dfa8cf7bb317869e30a3814214d2f1899b8a /lib
parentc3c7739811fc2231182d2b46f5fd42e44007dd2c (diff)
mr Khristophorov added support for lame web servers sending bad range
headers...
Diffstat (limited to 'lib')
-rw-r--r--lib/highlevel.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/highlevel.c b/lib/highlevel.c
index aeaa81a70..da3f4c94b 100644
--- a/lib/highlevel.c
+++ b/lib/highlevel.c
@@ -375,11 +375,16 @@ _Transfer(struct connectdata *c_conn)
if (strnequal("Content-Length", p, 14) &&
sscanf (p+14, ": %ld", &contentlength))
conn->size = contentlength;
- else if (strnequal("Content-Range", p, 13) &&
- sscanf (p+13, ": bytes %d-", &offset)) {
- if (data->resume_from == offset) {
- /* we asked for a resume and we got it */
- content_range = TRUE;
+ else if (strnequal("Content-Range", p, 13)) {
+ if (sscanf (p+13, ": bytes %d-", &offset) ||
+ sscanf (p+13, ": bytes: %d-", &offset)) {
+ /* This second format was added August 1st by Igor
+ 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 &&