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

curl-and-php

Re: XML => Curl => PHP

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Mon, 15 Aug 2005 23:52:07 +0200 (CEST)

On Mon, 15 Aug 2005, Betim Shkodra wrote:

> $header[] = "Content-type: text/xml\r\n";

The custom headers should not have CRLF added, libcurl adds those on its own.
Adding them will only confuse libcurl.

> $header[] = "Content-length: ".strlen($xml_data)."\r\n";

Don't do this. Let libcurl set that length on its own.

> $header[] = "Connection: Close\r\n";

Don't do this. Let libcurl deal with connections on its own.

> $header[] = "\r\n";

And certainly don't do this. This is not a header and this will cause a very
weird request.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2005-08-15