From: Michael Wallner Date: Mon, 2 Oct 2006 11:59:53 +0000 (+0000) Subject: - don't convert original $_SERVER entry to string X-Git-Tag: RELEASE_1_3_1~2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=0e998acc9b529b67de3b1a772e016dd85bbc8eb2;p=m6w6%2Fext-http - don't convert original $_SERVER entry to string --- diff --git a/http_headers_api.c b/http_headers_api.c index 7bbe8e9..4e65b1d 100644 --- a/http_headers_api.c +++ b/http_headers_api.c @@ -466,13 +466,14 @@ PHP_HTTP_API zend_bool _http_match_request_header_ex(const char *header, const c char *name; uint name_len = strlen(header); zend_bool result = 0; - zval **data; + zval **data, *zvalue; http_get_request_headers(NULL); name = pretty_key(estrndup(header, name_len), name_len, 1, 1); if (SUCCESS == zend_hash_find(HTTP_G->request.headers, name, name_len+1, (void *) &data)) { - convert_to_string_ex(data); - result = (match_case ? strcmp(Z_STRVAL_PP(data), value) : strcasecmp(Z_STRVAL_PP(data), value)) ? 0 : 1; + zvalue = zval_copy(IS_STRING, *data); + result = (match_case ? strcmp(Z_STRVAL_P(zvalue), value) : strcasecmp(Z_STRVAL_P(zvalue), value)) ? 0 : 1; + zval_free(&zvalue); } efree(name);