Skip to content

Commit 8be61d7

Browse files
committed
fix #29683 (headers_list() returns empty array)
1 parent 6f3b02c commit 8be61d7

File tree

5 files changed

+5
-12
lines changed

5 files changed

+5
-12
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ PHP NEWS
3434
PHP). (Marcus)
3535
- Fixed bug #31256 (PHP_EVAL_LIBLINE configure macro does not handle -pthread).
3636
(Jani)
37+
- Fixed bug #29683 (headers_list() returns empty array). (Tony)
3738
- Fixed bug #28355 (glob wont error if dir is not readable). (Hartmut)
3839
- Fixed bugs #20382, #28024, #30532, #32086, #32270, #32555, #32588, #33056
3940
(strtotime() related bugs). (Derick)

sapi/apache/mod_php5.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,7 @@ static int sapi_apache_header_handler(sapi_header_struct *sapi_header, sapi_head
199199

200200
*p = ':'; /* a well behaved header handler shouldn't change its original arguments */
201201

202-
efree(sapi_header->header);
203-
204-
return 0; /* don't use the default SAPI mechanism, Apache duplicates this functionality */
202+
return SAPI_HEADER_ADD;
205203
}
206204
/* }}} */
207205

sapi/apache2filter/sapi_apache2.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,7 @@ php_apache_sapi_header_handler(sapi_header_struct *sapi_header, sapi_headers_str
128128
else
129129
apr_table_add(ctx->r->headers_out, sapi_header->header, val);
130130

131-
sapi_free_header(sapi_header);
132-
133-
return 0;
131+
return SAPI_HEADER_ADD;
134132
}
135133

136134
static int

sapi/apache2handler/sapi_apache2.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,7 @@ php_apache_sapi_header_handler(sapi_header_struct *sapi_header,sapi_headers_stru
112112
apr_table_add(ctx->r->headers_out, sapi_header->header, val);
113113
}
114114

115-
sapi_free_header(sapi_header);
116-
117-
return 0;
115+
return SAPI_HEADER_ADD;
118116
}
119117

120118
static int

sapi/apache_hooks/mod_php5.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,7 @@ static int sapi_apache_header_handler(sapi_header_struct *sapi_header, sapi_head
340340

341341
*p = ':'; /* a well behaved header handler shouldn't change its original arguments */
342342

343-
efree(sapi_header->header);
344-
345-
return 0; /* don't use the default SAPI mechanism, Apache duplicates this functionality */
343+
return SAPI_HEADER_ADD;
346344
}
347345
/* }}} */
348346

0 commit comments

Comments
 (0)