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: Daniel Stenberg <daniel_at_haxx.se>
Date: Sat, 15 Dec 2007 22:23:16 +0100 (CET)

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
Received on 2007-12-15