diff --git a/src/ChangeLog b/src/ChangeLog index 7cc18131..0c41b1ed 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-11-09 Darshit Shah <darnir@gmail.com> + + * http.c (gethttps): Honour keep-alive when server responds with a 416 Range + not Satisfiable + 2014-11-09 Darshit Shah <darnir@gmail.com> * http.c (gethttp): Remove redundant condition evaluation diff --git a/src/http.c b/src/http.c index c112824f..584f4a85 100644 --- a/src/http.c +++ b/src/http.c @@ -2776,7 +2776,10 @@ read_header: /* Mark as successfully retrieved. */ *dt |= RETROKF; xfree_null (type); - CLOSE_INVALIDATE (sock); /* would be CLOSE_FINISH, but there + if (statcode == HTTP_STATUS_RANGE_NOT_SATISFIABLE) + CLOSE_FINISH (sock); + else + CLOSE_INVALIDATE (sock); /* would be CLOSE_FINISH, but there might be more bytes in the body. */ xfree (head); return RETRUNNEEDED;