summaryrefslogtreecommitdiff
path: root/main/SAPI.c
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2015-02-20 10:01:00 +0100
committerOndřej Surý <ondrej@sury.org>2015-02-20 10:01:00 +0100
commit347aa01617585e89149414a9763175a19d2dc651 (patch)
tree98170e6aeca907f029fe7b5abbbd2e7f2f4a5412 /main/SAPI.c
parent832b62efb8fceebb220116d8024d945a9bd31d7e (diff)
downloadphp-upstream.tar.gz
New upstream version 5.6.6+dfsgupstream
Diffstat (limited to 'main/SAPI.c')
-rw-r--r--main/SAPI.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index f9e9ccb04..550a4daf8 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2014 The PHP Group |
+ | Copyright (c) 1997-2015 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -747,13 +747,8 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC)
/* new line/NUL character safety check */
int i;
for (i = 0; i < header_line_len; i++) {
- /* RFC 2616 allows new lines if followed by SP or HT */
- int illegal_break =
- (header_line[i+1] != ' ' && header_line[i+1] != '\t')
- && (
- header_line[i] == '\n'
- || (header_line[i] == '\r' && header_line[i+1] != '\n'));
- if (illegal_break) {
+ /* RFC 7230 ch. 3.2.4 deprecates folding support */
+ if (header_line[i] == '\n' || header_line[i] == '\r') {
efree(header_line);
sapi_module.sapi_error(E_WARNING, "Header may not contain "
"more than a single header, new line detected");