Skip to content

Commit 8dbae45

Browse files
committed
Fixed crash because of uninitialized SG(sapi_headers).mimetype
1 parent 7b19ae3 commit 8dbae45

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

main/SAPI.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ SAPI_API void sapi_activate_headers_only(TSRMLS_D)
324324

325325
/* SG(sapi_headers).http_response_code = 200; */
326326
SG(sapi_headers).http_status_line = NULL;
327+
SG(sapi_headers).mimetype = NULL;
327328
SG(read_post_bytes) = 0;
328329
SG(request_info).post_data = NULL;
329330
SG(request_info).raw_post_data = NULL;
@@ -363,6 +364,7 @@ SAPI_API void sapi_activate(TSRMLS_D)
363364
SG(sapi_headers).http_response_code = 200;
364365
*/
365366
SG(sapi_headers).http_status_line = NULL;
367+
SG(sapi_headers).mimetype = NULL;
366368
SG(headers_sent) = 0;
367369
SG(read_post_bytes) = 0;
368370
SG(request_info).post_data = NULL;

0 commit comments

Comments
 (0)