summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorMichael Wallner <mike@php.net>2005-11-02 14:27:02 +0000
committerMichael Wallner <mike@php.net>2005-11-02 14:27:02 +0000
commitab95f1981ca0b914d08bd57069c37f1084a5ea05 (patch)
treefe80b270c4c4613c100dbcf56188e3db3250021a /main
parent971bebd6e3ffcd86a76a26b5871e019d5d6905ea (diff)
downloadphp-git-ab95f1981ca0b914d08bd57069c37f1084a5ea05.tar.gz
- sapi_header_op(SAPI_HEADER_(REPLACE|ADD), {NULL, 0, 0}) caused HTTP response splitting
- sapi_send_headers() already takes care of default_content_type (left over of fix for bug #29983)
Diffstat (limited to 'main')
-rw-r--r--main/SAPI.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/main/SAPI.c b/main/SAPI.c
index d2347f050b..86fb2de884 100644
--- a/main/SAPI.c
+++ b/main/SAPI.c
@@ -567,6 +567,10 @@ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC)
case SAPI_HEADER_REPLACE:
case SAPI_HEADER_ADD: {
sapi_header_line *p = arg;
+
+ if (!p->line || !p->line_len) {
+ return FAILURE;
+ }
header_line = p->line;
header_line_len = p->line_len;
http_response_code = p->response_code;