X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_functions.c;h=3abe73840a43545e353d9a87719bade4e750c93a;hp=737ae323ff6d7207faa6c2a93bab79e3fb47d852;hb=62fd5b5f1e43cf04e0467a48578826726cfe5821;hpb=b08947e98f1832091c8a9f6dea3799e0524d2822 diff --git a/http_functions.c b/http_functions.c index 737ae32..3abe738 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; @@ -1252,7 +1254,6 @@ PHP_FUNCTION(http_build_query) PHP_FUNCTION(http_test) { - RETURN_BOOL(HTTP_G(only_exceptions)); } /*