[Qemu-block] [PATCH V2] qemu-img / curl: When fetching Content-Size use GET instead of HEAD.

2015-12-11 Thread Boris Schrijver
A server can respond different to both methods, or can block one of the two. Signed-off-by: Boris Schrijver Reviewed-by: John Snow --- V2: Impovements over V1: - Don't check for CURLE_WRITE_ERROR, on success CURLE_OK will be returned. - Use

[Qemu-block] [PATCH V2] qemu-img / curl: When fetching Content-Size use GET instead of HEAD.

2015-12-11 Thread Boris Schrijver
A server can respond different to both methods, or can block one of the two. Signed-off-by: Boris Schrijver Reviewed-by: John Snow --- V2: Impovements over V1: - Don't check for CURLE_WRITE_ERROR, on success CURLE_OK will be returned. - Use

Re: [Qemu-block] [PATCH V2] qemu-img / curl: When fetching Content-Size use GET instead of HEAD.

2015-12-11 Thread Eric Blake
[adding qemu-devel; per http://wiki.qemu.org/Contribute/SubmitAPatch, ALL patches must include qemu-devel, even if they are also copying other sublists] On 12/11/2015 01:40 AM, Boris Schrijver wrote: > A server can respond different to both methods, or can block one of the two. > >

Re: [Qemu-block] [PATCH v2] qemu-img / curl: When fetching Content-Size use GET instead of HEAD.

2015-12-10 Thread John Snow
On 12/09/2015 05:37 PM, Boris Schrijver wrote: > Dear all, > > Thanks for your time so-far. > > I send a mail to the libcurl development list and got a helpful reaction [1]! > I > changed my patch accordingly. We now don't have to check for a > CURLE_WRITE_ERROR > anymore and

Re: [Qemu-block] [PATCH v2] qemu-img / curl: When fetching Content-Size use GET instead of HEAD.

2015-12-09 Thread Boris Schrijver
Dear all, Thanks for your time so-far. I send a mail to the libcurl development list and got a helpful reaction [1]! I changed my patch accordingly. We now don't have to check for a CURLE_WRITE_ERROR anymore and curl_easy_perform() will return CURLE_OK (0) on success. Please review! commit