+/* {{{ void http_get_request_headers(zval *) */
+PHP_HTTP_API void _http_get_request_headers(zval *array TSRMLS_DC)
+{
+ char *key;
+
+ for ( zend_hash_internal_pointer_reset(HTTP_SERVER_VARS);
+ zend_hash_get_current_key(HTTP_SERVER_VARS, &key, NULL, 0) != HASH_KEY_NON_EXISTANT;
+ zend_hash_move_forward(HTTP_SERVER_VARS)) {
+ if (!strncmp(key, "HTTP_", 5)) {
+ zval **header;
+ zend_hash_get_current_data(HTTP_SERVER_VARS, (void **) &header);
+ add_assoc_stringl(array, pretty_key(key + 5, strlen(key) - 5, 1, 1), Z_STRVAL_PP(header), Z_STRLEN_PP(header), 1);
+ }
+ }
+}
+/* }}} */
+