2 +--------------------------------------------------------------------+
4 +--------------------------------------------------------------------+
5 | Redistribution and use in source and binary forms, with or without |
6 | modification, are permitted provided that the conditions mentioned |
7 | in the accompanying LICENSE file are met. |
8 +--------------------------------------------------------------------+
9 | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
15 PHP_HTTP_API STATUS
php_http_headers_parse(const char *header
, size_t length
, HashTable
*headers
, php_http_info_callback_t callback_func
, void **callback_data TSRMLS_DC
)
17 php_http_header_parser_t ctx
;
18 php_http_buffer_t buf
;
20 php_http_buffer_from_string_ex(&buf
, header
, length
);
21 php_http_header_parser_init(&ctx TSRMLS_CC
);
22 php_http_header_parser_parse(&ctx
, &buf
, PHP_HTTP_HEADER_PARSER_CLEANUP
, headers
, callback_func
, callback_data
);
23 php_http_header_parser_dtor(&ctx
);
24 php_http_buffer_dtor(&buf
);
34 * vim600: noet sw=4 ts=4 fdm=marker
35 * vim<600: noet sw=4 ts=4