cURL / Mailing Lists / curl-library / Single Mail


Re: cURL-PHP PUT problem

From: Linus Nielsen Feltzing <>
Date: Fri, 04 Apr 2008 14:34:40 +0200

Mahendra Gayatri wrote:
> Hi,
> I was trying to use PUT to place a file onto a server. The deal here was
> to set certain headers, which I am doing too. But still there seems to
> be a problem as I am getting a response from Server saying the Headers
> were not set properly.

First of all, you should try the CURLOPT_VERBOSE option to see what is
going on.

    curl_setopt($ch, CURLOPT_VERBOSE, TRUE);

Secondly, you don't need to supply the Content-Length header, since that
is calculated and added by libcurl.

Received on 2008-04-04