X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_functions.c;h=ee8fba4e987df6ff8b0664a83dfa7095b3012a4f;hp=737ae323ff6d7207faa6c2a93bab79e3fb47d852;hb=3177ba2e5ef642f38c01568afcaa547df65f3e74;hpb=de16567e9643ae9a0fb33e81419985492ecf5a37 diff --git a/http_functions.c b/http_functions.c index 737ae32..ee8fba4 100644 --- a/http_functions.c +++ b/http_functions.c @@ -497,8 +497,10 @@ PHP_FUNCTION(http_redirect) } efree(URI); - if ((SUCCESS == http_send_header(LOC)) && (SUCCESS == http_send_status((permanent ? 301 : 302)))) { - php_body_write(RED, strlen(RED) TSRMLS_CC); + if ((SUCCESS == http_send_header_string(LOC)) && (SUCCESS == http_send_status((permanent ? 301 : 302)))) { + if (SG(request_info).request_method && strcmp(SG(request_info).request_method, "HEAD")) { + PHPWRITE(RED, strlen(RED)); + } RETURN_TRUE; } RETURN_FALSE;