cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

RE: Getting Raw Response

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 6 Aug 2008 23:41:40 +0200 (CEST)

On Wed, 6 Aug 2008, Steven Morgan wrote:

> As a little background, what I'm trying to do is make use of cURLs
> sophisticated proxy settings, but handle the parsing of the response
> provided by the remote server manually - so I was hoping for access to the
> *exact* data that was received as if it was obtained by a pure socket
> request. I'm just wondering how to achieve this with cURL?

If you ask for the headers in the data stream (as already mentioned) and then
also disable any possible content and transfer decoding (with
CURLOPT_HTTP_CONTENT_DECODING and CURLOPT_HTTP_TRANSFER_DECODING), you will
get the exact same contents libcurl itself received.

Just note that you will need to implement a proper chunked transfer decoder
etc.

-- 
  / daniel.haxx.se
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-08-06