cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Sometimes getting chunked data back, sometimes not.

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 15 May 2014 22:06:34 +0200 (CEST)

On Thu, 15 May 2014, Greg Chapman wrote:

> I'm using OAuth 2.0 with Google Contacts. It's all working well (using CURL
> with Visual Studio C++ to make requests) but sometimes (recently?) my
> returned JSON object instead of looking like this:

[...]

> is not only chunked with loads of newline characters but also repeats itself
> several times. This is messing with my simple parsing system and makes it
> difficult to extract the data. Is there a way of disabling chunking, or is
> it a problem with Google?

Messed data back happens most likely because of either A) the server sends you
this crap or B) your receiving code (write callback) is doing something wrong.

(option C) a libcurl bug is of course impossible! ;-)

You haven't really told us enough details to help us tell you which of the
options that are most likely.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2014-05-15