Bug #61525 [Opn]: PHP's HTTP functions require at least one space after HTTP header colon
| From: | rkip at reprovinci dot nl | Date: | Tue, 27 Mar 2012 09:37:06 +0000 |
| Subject: | Bug #61525 [Opn]: PHP's HTTP functions require at least one space after HTTP header colon | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-168865@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61525&edit=1
ID: 61525
User updated by: rkip at reprovinci dot nl
Reported by: rkip at reprovinci dot nl
Summary: PHP's HTTP functions require at least one space
after HTTP header colon
Status: Open
Type: Bug
Package: HTTP related
Operating System: Windows 7, Debian, Ubuntu
PHP Version: 5.4.0
Block user comment: N
Private report: N
New Comment:
The returned header value could perhaps also be ltrimmed.
Previous Comments:
------------------------------------------------------------------------
[2012-03-27 09:34:49] rkip at reprovinci dot nl
Description:
------------
We were testing a SOAP connection and kept receiving the following error:
Error Fetching http body, No Content-Length, connection closed or chunked data.
After looking for this error message in PHP's source, I found get_http_body() was
looking for headers with a space after the colon:
header = get_http_header_value(headers, "Content-Length: ");
This trailing space is no longer required (yet a single space is recommended) by
the HTTP 1.1 specification. (http://www.w3.org/Protocols/rfc2616/rfc2616-
sec4.html#sec4.2)
This issue should be easy to fix by removing the trailing space from the 12 or so
calls to get_http_header_value().
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61525&edit=1