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

curl-and-php

RE: Splitting header and body and reliably detecting the ole http return code...

From: Drew Weaver <drew.weaver_at_thenap.com>
Date: Sat, 15 Dec 2007 17:24:52 -0500

Yeah, as I mentioned I tried getting that to work and I couldn't.

And for a 20 line script that solution just seemed pretty complex.

-Drew

-----Original Message-----
From: curl-and-php-bounces_at_cool.haxx.se [mailto:curl-and-php-bounces_at_cool.haxx.se] On Behalf Of Daniel Stenberg
Sent: Saturday, December 15, 2007 4:23 PM
To: curl with PHP
Subject: Re: Splitting header and body and reliably detecting the ole http return code...

On Sat, 15 Dec 2007, Drew Weaver wrote:

> It Is my understanding that "technically" there is supposed to be a \r\n\r\n
> between the header and the body on pretty much every http daemon unless I'm
> totally clueless..

Correct. But really, use CURLOPT_HEADERFUNCTION and CURLOPT_WRITEFUNCTION and
your entire need to do this separation is gone. libcurl already does the
separation "under the hood" so there's really no reason at all for the app-
layer to (attempt to) do it again...

--
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-12-15