X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_functions.c;h=f4d32b202ef5a4313fe467a0d03db364543be8ad;hp=3ed49b22f6e8b8261a9737cba6c3d80793e31055;hb=e9221ae5b72d1add77a6874595bbd0b98d0446a0;hpb=f6e558f7886fff36d239ae2fae69d955ac6925ee diff --git a/http_functions.c b/http_functions.c index 3ed49b2..f4d32b2 100644 --- a/http_functions.c +++ b/http_functions.c @@ -469,7 +469,7 @@ PHP_FUNCTION(http_redirect) } URI = http_absolute_uri(url); - + if (query_len) { snprintf(LOC, HTTP_URI_MAXLEN + sizeof("Location: "), "Location: %s?%s", URI, query); sprintf(RED, "Redirecting to %s?%s.\n", URI, query, URI, query); @@ -632,8 +632,8 @@ PHP_FUNCTION(http_parse_headers) if (rnrn = strstr(header, HTTP_CRLF HTTP_CRLF)) { header_len = rnrn - header + 2; } - if (SUCCESS != http_parse_headers(header, header_len, Z_ARRVAL_P(return_value))) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not parse HTTP header"); + if (SUCCESS != http_parse_headers(header, header_len, return_value)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not parse HTTP headers"); zval_dtor(return_value); RETURN_FALSE; }