mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
Fixed bug #49851 (http wrapper breaks on 1024 char long headers).
This commit is contained in:
parent
7179910573
commit
47b3371122
2 changed files with 5 additions and 0 deletions
1
NEWS
1
NEWS
|
@ -95,6 +95,7 @@ PHP NEWS
|
||||||
- Fixed bug #49866 (Making reference on string offsets crashes PHP). (Dmitry)
|
- Fixed bug #49866 (Making reference on string offsets crashes PHP). (Dmitry)
|
||||||
- Fixed bug #49855 (import_request_variables() always returns NULL). (Ilia,
|
- Fixed bug #49855 (import_request_variables() always returns NULL). (Ilia,
|
||||||
sjoerd at php dot net)
|
sjoerd at php dot net)
|
||||||
|
- Fixed bug #49851 (http wrapper breaks on 1024 char long headers). (Ilia)
|
||||||
- Fixed bug #49800 (SimpleXML allow (un)serialize() calls without warning).
|
- Fixed bug #49800 (SimpleXML allow (un)serialize() calls without warning).
|
||||||
(Ilia, wmeler at wp-sa dot pl)
|
(Ilia, wmeler at wp-sa dot pl)
|
||||||
- Fixed bug #49719 (ReflectionClass::hasProperty returns true for a private
|
- Fixed bug #49719 (ReflectionClass::hasProperty returns true for a private
|
||||||
|
|
|
@ -610,6 +610,10 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
|
||||||
size_t http_header_line_length;
|
size_t http_header_line_length;
|
||||||
if (php_stream_get_line(stream, http_header_line, HTTP_HEADER_BLOCK_SIZE, &http_header_line_length) && *http_header_line != '\n' && *http_header_line != '\r') {
|
if (php_stream_get_line(stream, http_header_line, HTTP_HEADER_BLOCK_SIZE, &http_header_line_length) && *http_header_line != '\n' && *http_header_line != '\r') {
|
||||||
char *e = http_header_line + http_header_line_length - 1;
|
char *e = http_header_line + http_header_line_length - 1;
|
||||||
|
if (*e != '\n') { /* partial header */
|
||||||
|
php_stream_get_line(stream, http_header_line, HTTP_HEADER_BLOCK_SIZE, &http_header_line_length);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
while (*e == '\n' || *e == '\r') {
|
while (*e == '\n' || *e == '\r') {
|
||||||
e--;
|
e--;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue