Hello,

On 08/16/2004 12:40 PM, Dominic Schanen wrote:
I'm sending a custom request to a server using CURL, which may contain some high-ascii characters. Are there certain characters that would cause CURL not to send the complete custom request? Are there some CURL options that can help make sure the request is sent in its entirity? Here is my code:

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_HTTP_VERSION, 1.0);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, $request);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$return = curl_exec ($ch);

Sometimes it appears to cutoff my request with the existance of a NUL character.

Any ideas?

That depends on where you are using non-ASCII characters. If it is in the request headers, you need to use q-encoding to encode them as ASCII. If it is in the request body, it should not be a problem, although I think you should specify the character set in the Content-Type header.


--

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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to