note 65738 deleted from features.remote-files by googleguy
| From: | googleguy@php.net | Date: | Tue, 22 Oct 2013 06:53:47 +0000 |
| Subject: | note 65738 deleted from features.remote-files by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-196698@lists.php.net to get a copy of this message | ||
Note Submitter: geoffrey at nevra dot net
----
Really, you should not send headers terminated by \n - it's not per-rfc supported by a HTTP
server.
Instead, send as \r\n which is what the protocol specifies, and that regular expression would be
matched anywhere, so match for something like /^Content-Length: \d+$/i on each header-line (headers
are terminated by the regular expression /(\r\n|[\r\n])/ - so preg_split on that. Remeber to use
the appropriate flags, I can't be arsed to look them up)