X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_api.c;h=999826dfa7af7a6c89bc8bf72e27519ef1d0063c;hp=eebfeb2ef80840c9f2f53bb46b3782413941dcea;hb=b5ea35825528c10ee3d78727437317a9d3bc3336;hpb=ffc893b125c6cc9b385a68a357b08ba2cc4e91f6 diff --git a/http_api.c b/http_api.c index eebfeb2..999826d 100644 --- a/http_api.c +++ b/http_api.c @@ -22,6 +22,7 @@ #include "SAPI.h" #include "ext/standard/url.h" +#include "ext/standard/head.h" #include "php_http.h" #include "php_http_std_defs.h" @@ -220,7 +221,7 @@ STATUS _http_exit_ex(int status, char *header, char *body, zend_bool send_header } } - if (body) { + if (php_header(TSRMLS_C) && body) { PHPWRITE(body, strlen(body)); } @@ -228,6 +229,8 @@ STATUS _http_exit_ex(int status, char *header, char *body, zend_bool send_header { case 301: http_log(HTTP_G(log).redirect, "301-REDIRECT", header); break; case 302: http_log(HTTP_G(log).redirect, "302-REDIRECT", header); break; + case 303: http_log(HTTP_G(log).redirect, "303-REDIRECT", header); break; + case 307: http_log(HTTP_G(log).redirect, "307-REDIRECT", header); break; case 304: http_log(HTTP_G(log).cache, "304-CACHE", header); break; case 405: http_log(HTTP_G(log).allowed_methods, "405-ALLOWED", header); break; default: http_log(NULL, header, body); break;