cURL / Mailing Lists / curl-library / Single Mail


Re: reagrding error in getting complete server response

From: Fahad Ashfaque <>
Date: Fri, 15 Nov 2013 22:31:13 -0500

He is saying that your output might contain a '\0' not '0' which might be
causing the termination of string. Since printf() stops printing when it
sees a \0. As an example

printf("This part of string will print but \0 this will never print");

What he is suggesting is , you printf() or save to file the HTTP-RESPONSE
headers, specifically the Content-Length header and see if length is
greater than the actual output. Or write some code to walk the whole
response and print it character by charactor, and stops at Content-Length

On Fri, Nov 15, 2013 at 7:01 PM, Sunil Chandrasekharan <> wrote:

> chunk.size and chunk.memory
>>> *chunk.size = 12076*
>>> *chunk.memory = it just prints a small section the first part upto the
>>> starting line of "iteration 1"*
>> Because the data contains a binary zero somewhere in there, right? So
>> using printf() or _anything_ that assumes a terminating byte code is plain
>> wrong.
> Hi Dan,
> Can you tell me what you meant. I didnt understand your response. binary
> zero?
> do you mean to say if the output contains any '0' ? it has lot of them as
> the environment variable prints IP address and toerh details , hence there
> are many 0s randomly occuring in the output.
> But is this what you meant? can you make it more clear
> -------------------------------------------------------------------
> List admin:
> Etiquette:

List admin:
Received on 2013-11-16