+
+ php_end_ob_buffers(0 TSRMLS_CC);
+ if (php_header(TSRMLS_C) && body) {
+ PHPWRITE(body, strlen(body));
+ }
+
+ switch (status)
+ {
+ 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;
+ }
+
+ STR_FREE(header);
+ STR_FREE(body);
+
+ if (HTTP_G(force_exit)) {
+ zend_bailout();
+ } else {
+ php_ob_set_internal_handler(http_ob_blackhole, 4096, "blackhole", 0 TSRMLS_CC);
+ }
+