curl-library
RE: cURL-PHP PUT problem
Date: Sat, 5 Apr 2008 02:57:58 -0700
Hi Linus,
Thanks for the reply, but my problem stays put.
By including the VERBOSE option also I am not getting anything different... The following is the respose and it does not give any clues what is going wrong.
HTTP/1.1 412 Precondition Failed
Date: Sat, 05 Apr 2008 09:49:12 GMT
Server: Apache/2.2.3 (Debian) mod_python/3.2.10 Python/2.4.4
Content-Length: 0
Content-Type: text/plain; charset=UTF-8
-----Original Message-----
From: curl-library-bounces_at_cool.haxx.se on behalf of Linus Nielsen Feltzing
Sent: Fri 4/4/2008 5:34 AM
To: libcurl development
Subject: Re: cURL-PHP PUT problem
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.
Linus
- application/ms-tnef attachment: winmail.dat