-
- if (SUCCESS == zend_hash_find(&EG(symbol_table), "_SERVER", sizeof("_SERVER"), (void **) &hsv)) {
- FOREACH_KEY(pos, *hsv, key, idx) {
- if (key && !strncmp(key, "HTTP_", 5)) {
- zval **header;
+#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;