note 82418 added to function.curl-setopt
| From: | sgamon at yahoo dot com | Date: | Thu, 10 Apr 2008 00:55:35 +0000 |
| Subject: | note 82418 added to function.curl-setopt | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-138087@lists.php.net to get a copy of this message | ||
If you are doing a POST, and the content length is 1,025 or greater, then curl exploits a feature of
http 1.1: 100 (Continue) Status.
See http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html#sec8.2.3
* it adds a header, "Expect: 100-continue".
* it then sends the request head, waits for a 100 response code, then sends the content
Not all web servers support this though. Various errors are returned depending on the server. If
this happens to you, suppress the "Expect" header with this command:
<?php
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
?>
See http://www.gnegg.ch/2007/02/the-return-of-except-100-continue/
----
Server IP: 209.41.74.194
Probable Submitter: 199.106.72.2
----
Manual Page -- http://www.php.net/manual/en/function.curl-setopt.php
Edit -- https://master.php.net/note/edit/82418
Del: integrated -- https://master.php.net/note/delete/82418/integrated
Del: useless -- https://master.php.net/note/delete/82418/useless
Del: bad code -- https://master.php.net/note/delete/82418/bad+code
Del: spam -- https://master.php.net/note/delete/82418/spam
Del: non-english -- https://master.php.net/note/delete/82418/non-english
Del: in docs -- https://master.php.net/note/delete/82418/in+docs
Del: other reasons-- https://master.php.net/note/delete/82418
Reject -- https://master.php.net/note/reject/82418
Search -- https://master.php.net/manage/user-notes.php