7 Aug 2008 01:24
RE: Getting Raw Response
Steven Morgan <gatecrasher1981 <at> hotmail.com>
2008-08-06 23:24:46 GMT
2008-08-06 23:24:46 GMT
Thanks for the replies all. This is exactly what I was curious about.
Is it possible to disable cURL Content Decoding without disabling the cURL Transfer Decoding? Are these supported in PHP 5.2.5?
I just tried setting to both 0 and false and observed no change in output, despite the Transfer-encoding header being received as "chunked". Where content is received in a "chunked" state and CURLOPT_HTTP_CONTENT_DECODING set to false, I'm assuming it should not be possible to display cURLS output correctly in a browser? (This was my mini test hitting google.com that's why I ask).
What is the best way to ensure these settings have been applied?
Thanks again for the assistance, appreciated.
Cheers,
Steve
> Date: Wed, 6 Aug 2008 23:41:40 +0200
> From: daniel <at> haxx.se
> To: curl-and-php <at> cool.haxx.se
> Subject: RE: Getting Raw Response
>
> 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
Get Hotmail on your mobile from Vodafone Try it Now!
Is it possible to disable cURL Content Decoding without disabling the cURL Transfer Decoding? Are these supported in PHP 5.2.5?
I just tried setting to both 0 and false and observed no change in output, despite the Transfer-encoding header being received as "chunked". Where content is received in a "chunked" state and CURLOPT_HTTP_CONTENT_DECODING set to false, I'm assuming it should not be possible to display cURLS output correctly in a browser? (This was my mini test hitting google.com that's why I ask).
What is the best way to ensure these settings have been applied?
Thanks again for the assistance, appreciated.
Cheers,
Steve
> Date: Wed, 6 Aug 2008 23:41:40 +0200
> From: daniel <at> haxx.se
> To: curl-and-php <at> cool.haxx.se
> Subject: RE: Getting Raw Response
>
> 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
Get Hotmail on your mobile from Vodafone Try it Now!
_______________________________________________ http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
RSS Feed