Dag-Erling Smørgrav c8453e5bf4 Fix partial requests (used by fetch -r) when the requested file is
already complete.

Since 416 is an error code, any Content-Range header in the response
would refer to the error message, not the requested document, so
relying on the value of size when we know we got a 416 is wrong.
Instead, just verify that offset == 0 and assume that we've reached
the end of the document (if offset > 0, we did not request a range,
and the server is screwing with us).  Note that we cannot distinguish
between reaching the end and going past it, but that is a flaw in the
protocol, not in the code, so we just have to assume that the caller
knows what it's doing.  A smart caller would request an offset
slightly before what it believes is the end and compare the result to
what is already in the file.

PR:		212065
Reported by:	mandree
MFC after:	3 weeks
2017-03-05 12:06:45 +00:00
..
2017-03-02 22:59:35 +00:00
2017-02-24 06:49:31 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
MFH
2016-04-04 23:55:32 +00:00
MFH
2016-03-02 16:14:46 +00:00
2017-01-30 23:00:51 +00:00
MFH
2016-03-02 16:14:46 +00:00
2016-11-11 23:28:07 +00:00
2017-02-28 23:42:47 +00:00
2017-02-06 08:49:57 +00:00
2017-02-28 23:42:47 +00:00
2016-11-20 06:10:12 +00:00
2017-02-07 19:47:30 +00:00
2017-02-13 08:23:39 +00:00
MFH
2016-03-02 16:14:46 +00:00
2017-02-27 00:10:00 +00:00
2017-02-28 23:42:47 +00:00
2017-02-28 23:42:47 +00:00
MFH
2016-04-13 16:19:50 +00:00
2017-02-14 13:35:59 +00:00
2016-05-29 01:43:28 +00:00
2017-02-28 23:42:47 +00:00
2017-01-04 16:09:08 +00:00
2017-02-28 23:42:47 +00:00
2017-01-28 23:51:03 +00:00