+/* {{{ proto array http_parse_headers(string header) */
+PHP_FUNCTION(http_parse_headers)
+{
+ char *header, *rnrn;
+ int header_len;
+
+ if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &header, &header_len)) {
+ RETURN_FALSE;
+ }
+
+ array_init(return_value);
+
+ if (rnrn = strstr(header, HTTP_CRLF HTTP_CRLF)) {
+ header_len = rnrn - header + 2;
+ }
+ if (SUCCESS != http_parse_headers(header, header_len, return_value)) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not parse HTTP header");
+ zval_dtor(return_value);
+ RETURN_FALSE;
+ }
+}
+/* }}}*/
+