Re: [Qemu-devel] [PATCH v2] curl: refuse to open URL from HTTP server without range support

2013-06-17 Thread Richard W.M. Jones
On Mon, Jun 17, 2013 at 07:02:00PM +0800, Fam Zheng wrote: > On Mon, 06/17 11:54, Richard W.M. Jones wrote: > > On Mon, Jun 17, 2013 at 06:09:23PM +0800, Fam Zheng wrote: > > > +if (real_size >= strlen(accept_len) > > > > What's accept_len? This patch gives me a couple of compile errors: > >

Re: [Qemu-devel] [PATCH v2] curl: refuse to open URL from HTTP server without range support

2013-06-17 Thread Fam Zheng
On Mon, 06/17 11:54, Richard W.M. Jones wrote: > On Mon, Jun 17, 2013 at 06:09:23PM +0800, Fam Zheng wrote: > > +if (real_size >= strlen(accept_len) > > What's accept_len? This patch gives me a couple of compile errors: > Oops, a copy&paste mistake. I meant this: +if (realsize >= strlen

Re: [Qemu-devel] [PATCH v2] curl: refuse to open URL from HTTP server without range support

2013-06-17 Thread Richard W.M. Jones
On Mon, Jun 17, 2013 at 06:09:23PM +0800, Fam Zheng wrote: > +if (real_size >= strlen(accept_len) What's accept_len? This patch gives me a couple of compile errors: block/curl.c: In function ‘curl_header_cb’: block/curl.c:120:9: error: ‘real_size’ undeclared (first use in this function) bloc

[Qemu-devel] [PATCH v2] curl: refuse to open URL from HTTP server without range support

2013-06-17 Thread Fam Zheng
CURL driver requests partial data from server on guest IO req. For HTTP and HTTPS, it uses "Range: ***" in requests, and this will not work if server not accepting range. This patch does this check when open. * Removed curl_size_cb, which is not used: On one hand it's registered to libcurl as