summaryrefslogtreecommitdiff
path: root/main/SAPI.c
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2015-02-08 14:08:31 +0000
committerJakub Zelenka <bukka@php.net>2015-02-08 14:08:31 +0000
commitf2825042b4dd9aa941a080c027f15f41c1b9e4bc (patch)
tree2e7d97c1dfd4aeabb506ffdd206a612b82adea8d /main/SAPI.c
parent0a81f9a0bd36deac8707949acbcf92f612b60e8e (diff)
parentce9f52adcdfb19f70dc4274f3587e58ac07995bd (diff)
downloadphp-git-f2825042b4dd9aa941a080c027f15f41c1b9e4bc.tar.gz
Merge branch 'master' into jsond
Conflicts: ext/json/json.c
Diffstat (limited to 'main/SAPI.c')
-rw-r--r--main/SAPI.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index 0106448b7a..6a4105970a 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -744,13 +744,8 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg)
/* new line/NUL character safety check */
uint 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");