/* $Id$ */
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
#include "php_http.h"
#include "ext/standard/url.h"
}
/* if we already have got such a header make an array of those */
- if (SUCCESS == zend_hash_find(headers, key, keylen + 1, (void **) &previous)) {
+ if (SUCCESS == zend_hash_find(headers, key, keylen + 1, (void *) &previous)) {
/* convert to array */
if (Z_TYPE_PP(previous) != IS_ARRAY) {
convert_to_array(*previous);
HashPosition pos;
Z_ARRVAL(array) = headers;
-
- if (SUCCESS == zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void **) &hsv)) {
+#ifdef ZEND_ENGINE_2
+ zend_is_auto_global("_SERVER", lenof("_SERVER") TSRMLS_CC);
+#endif
+ if (SUCCESS == zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void *) &hsv)) {
FOREACH_KEYLEN(pos, *hsv, key, keylen, idx) {
if (key && keylen > 6 && !strncmp(key, "HTTP_", 5)) {
zval **header, *orig;
key = pretty_key(estrndup(key, keylen), keylen, 1, 1);
}
- zend_hash_get_current_data_ex(Z_ARRVAL_PP(hsv), (void **) &header, &pos);
+ zend_hash_get_current_data_ex(Z_ARRVAL_PP(hsv), (void *) &header, &pos);
orig = *header;
convert_to_string_ex(header);
zend_hash_init(&headers, 0, NULL, ZVAL_PTR_DTOR, 0);
http_get_request_headers_ex(&headers, 1);
- if (SUCCESS == zend_hash_find(&headers, name, name_len+1, (void **) &data)) {
+ if (SUCCESS == zend_hash_find(&headers, name, name_len+1, (void *) &data)) {
result = (match_case ? strcmp(Z_STRVAL_PP(data), value) : strcasecmp(Z_STRVAL_PP(data), value)) ? 0 : 1;
}
zend_hash_destroy(&headers);