php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #61525 SOAP functions require at least one space after HTTP header colon
Submitted: 2012-03-27 09:34 UTC Modified: 2013-09-30 12:28 UTC
Votes:2
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: rkip at reprovinci dot nl Assigned:
Status: Closed Package: SOAP related
PHP Version: 5.4.0 OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rkip at reprovinci dot nl
New email:
PHP Version: OS:

 

 [2012-03-27 09:34 UTC] 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().


Patches

61525-bugfix.patch (last revision 2012-03-29 07:01 UTC by joe at joegillotti dot com)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-03-27 09:37 UTC] rkip at reprovinci dot nl
The returned header value could perhaps also be ltrimmed.
 [2013-09-30 12:28 UTC] mike@php.net
-Summary: PHP's HTTP functions require at least one space after HTTP header colon +Summary: SOAP functions require at least one space after HTTP header colon -Package: HTTP related +Package: SOAP related -Operating System: Windows 7, Debian, Ubuntu +Operating System:
 [2024-09-08 08:42 UTC] git@php.net
Automatic comment on behalf of nielsdos
Revision: https://github.com/php/php-src/commit/7771ec07e5cb00f2400055fa5d2d08af4bc92809
Log: Fix bug #61525: SOAP functions require at least one space after HTTP header colon
 [2024-09-08 08:42 UTC] git@php.net
-Status: Open +Status: Closed
 [2024-09-09 12:49 UTC] git@php.net
Automatic comment on behalf of nielsdos
Revision: https://github.com/php/php-src-security/commit/7771ec07e5cb00f2400055fa5d2d08af4bc92809
Log: Fix bug #61525: SOAP functions require at least one space after HTTP header colon
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Feb 01 11:01:30 2025 UTC