cvs: pecl /http http_headers_api.c
| From: | Michael Wallner | Date: | Mon, 02 Oct 2006 11:59:53 +0000 |
| Subject: | cvs: pecl /http http_headers_api.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-6441@lists.php.net to get a copy of this message | ||
mike Mon Oct 2 11:59:53 2006 UTC
Modified files:
/pecl/http http_headers_api.c
Log:
- don't convert original $_SERVER entry to string
http://cvs.php.net/viewvc.cgi/pecl/http/http_headers_api.c?r1=1.51&r2=1.52&diff_format=u
Index: pecl/http/http_headers_api.c
diff -u pecl/http/http_headers_api.c:1.51 pecl/http/http_headers_api.c:1.52
--- pecl/http/http_headers_api.c:1.51 Mon Oct 2 11:48:37 2006
+++ pecl/http/http_headers_api.c Mon Oct 2 11:59:53 2006
@@ -10,7 +10,7 @@
+--------------------------------------------------------------------+
*/
-/* $Id: http_headers_api.c,v 1.51 2006/10/02 11:48:37 mike Exp $ */
+/* $Id: http_headers_api.c,v 1.52 2006/10/02 11:59:53 mike Exp $ */
#include "php_http.h"
@@ -466,13 +466,14 @@
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);