curl-library
Re: Crash in curl library while processing HTTP HEAD response
Date: Mon, 22 Aug 2016 16:33:42 +0530
On Mon, Aug 22, 2016 at 5:23 AM, Ray Satiro via curl-library
<curl-library_at_cool.haxx.se> wrote:
> On 8/20/2016 1:26 PM, Daniel Stenberg wrote:
>
> On Sat, 20 Aug 2016, Ray Satiro via curl-library wrote:
>
> I don't know if this was mentioned already but in your case even though you
> chose CURLOPT_NOBODY [1] the data still goes to the write function
> (CURLOPT_WRITEFUNCTION [2], CURLOPT_WRITEDATA [3]) since there doesn't
> appear to be a proper response. I guess an issue is whether or not that's
> correct for NOBODY but also I guess on your end your write function is
> probably crashing.
>
>
> Right, this could indeed be a surprising behavior to applications. We should
> probably prevent this from happening.
>
>
> I opened https://github.com/curl/curl/issues/973 for this
>
>
> -------------------------------------------------------------------
> List admin: https://cool.haxx.se/list/listinfo/curl-library
> Etiquette: https://curl.haxx.se/mail/etiquette.html
Below is the command I ran on curl [7.50.1] using command as below it
did not crash but my application which is using curl 7.12.1 is
crashing(for that I did not try by curl command).
=================== server: ======================
[labsrv2 ~]$nc -l 8080
HEAD / HTTP/1.1
Host: 10.221.57.2:8080
User-Agent: curl/7.50.1
Accept: */*
fasdfdfsdadfadfasd\n\r
================================================
=====================client :====================
[labsrv1 ~]$curl --head http://10.221.57.2:8080
fasdfdfsdadfadfasd\n\r
==============================================
Thanks !!
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-08-22