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-2010, Michael Wallner <mike@php.net> |
10 +--------------------------------------------------------------------+
13 /* $Id: http_headers_api.c 300300 2010-06-09 07:29:35Z mike $ */
17 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
)
19 php_http_header_parser_t ctx
;
20 php_http_buffer_t buf
;
22 php_http_buffer_from_string_ex(&buf
, header
, length
);
23 php_http_header_parser_init(&ctx TSRMLS_CC
);
24 php_http_header_parser_parse(&ctx
, &buf
, PHP_HTTP_HEADER_PARSER_CLEANUP
, headers
, callback_func
, callback_data
);
25 php_http_header_parser_dtor(&ctx
);
26 php_http_buffer_dtor(&buf
);
36 * vim600: noet sw=4 ts=4 fdm=marker
37 * vim<600: noet sw=4 ts=4