|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73882 Patch for php_stream_url_wrap_http_ex to support multiple spaces
Submitted: 2017-01-06 15:51 UTC Modified: 2017-01-08 10:56 UTC
From: laurentconstantin at free dot fr Assigned: nikic (profile)
Status: Closed Package: HTTP related
PHP Version: 5.6.29 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
23 - 9 = ?
Subscribe to this entry?

 [2017-01-06 15:51 UTC] laurentconstantin at free dot fr

The function php_stream_url_wrap_http_ex() in file ext/standard/http_fopen_wrapper.c
checks the presence of the "Transfer-Encoding: chunked" HTTP header to detect if
the filter has to be used.

However, the HTTP RFC allows multiple spaces after the ':'.

This patch adds the supports of this case.

This patch also updates the Location, Content-Type and Content-Length processing
which suffers the same bug. I've created two generic functions easier to use.

Thank you.


patch.txt (last revision 2017-01-06 15:55 UTC by laurentconstantin at free dot fr)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-07 21:10 UTC]
-Assigned To: +Assigned To: nikic
 [2017-01-08 10:56 UTC]
-Status: Assigned +Status: Closed
 [2017-01-08 10:56 UTC]
I've merged PR yesterday, which is a fix for the same issue, which has been hanging around in the queue for some months. As the PR is older and a bit more complete (it also removes trailing whitespace, which the spec also allows), I went with it. But in any case, thanks for providing a patch :)
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sun Feb 28 08:01:25 2021 UTC