Re: http 411 error with cURL

From: Date: Sun, 10 Oct 2004 02:59:55 +0000
Subject: Re: http 411 error with cURL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-199093@lists.php.net to get a copy of this message
Hello, On 10/09/2004 07:49 PM, Nick Wilson wrote:
Im getting an http 411 error when trying to post data with php's cURL functions. The spec says ***The message for this error code is "Length Required." The server refuses to accept the request without a defined Content- Length.*** Im confused on 2 points: * Is it the server i am posting *from* causing the error or is it the server im posting *to*? * How to resolve this?
It seems cURL is sending a malformed HTTP request. When I used Curl I don't let it compose the request. Instead I use this HTTP client class that lets me use cUrl or fsockopen to establish HTTP connection and it takes care of sending the HTTP request correctly regardless of the way the request is sent. http://www.phpclasses.org/httpclient -- Regards, Manuel Lemos PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ PHP Reviews - Reviews of PHP books and other products http://www.phpclasses.org/reviews/ Metastorage - Data object relational mapping layer generator http://www.meta-language.net/metastorage.html

« previous php.general (#199093) next »