cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl as a proxy

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 13 Jan 2006 10:21:48 +0100 (CET)

On Fri, 13 Jan 2006, Manuel Arguelles wrote:

> Do you know of any project like that? that I can take a look at the code?

Nope. I've only seen others talk about it. And there are too many
libcurl-using projects out for me to keep track of!

> with raw data I mean exactly the same that get's from the page, but with
> some browsers I'm getting "bad http resonse" or "document contains no data",
> also I'm printing all before sending it to the socket and

You'll of course get all response headers and response body. As has been
pointed out in the past, libcurl does do some magic on the received data
without updating the headers so you need to take this into account (or
possibly use DEBUGFUNCTION to get an even rawer version of the data). For
example libcurl "decodes" chunked responses and you get the data in fine
binary chunks, but the headers you receive will say the response is chunked.

> Content-Length: 386

...

> GIF89aŠ
>
> GIF89aŠ? where is the data... am I missing something?

Eh, are you possibly treaing the passed data as zero terminated? GIF images
have that text firt in their data...

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-01-13