-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphp_picohttpparser.c
70 lines (61 loc) · 2.03 KB
/
php_picohttpparser.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* picohttpparser extension for PHP (c) 2024 Lochemem Bruno Michael */
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "src/pico.c"
#include "php_picohttpparser.h"
#include "picohttpparser_arginfo.h"
/* {{{ picohttp_parse_request( string request [, int header_limit = 100 ] ) */
PHP_FUNCTION(picohttp_parse_request)
{
parse_http_request(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
/* }}} */
/* {{{ picohttp_parse_response( string request [, int header_limit = 100 ] ) */
PHP_FUNCTION(picohttp_parse_response)
{
parse_http_response(INTERNAL_FUNCTION_PARAM_PASSTHRU);
}
/* }}} */
/* {{{ PHP_MINIT_FUNCTION */
PHP_MINIT_FUNCTION(picohttpparser)
{
return SUCCESS;
}
/* }}} */
/* {{{ PHP_RINIT_FUNCTION */
PHP_RINIT_FUNCTION(picohttpparser)
{
#if defined(ZTS) && defined(COMPILE_DL_PICOHTTPPARSER)
ZEND_TSRMLS_CACHE_UPDATE();
#endif
return SUCCESS;
}
/* }}} */
/* {{{ PHP_MINFO_FUNCTION */
PHP_MINFO_FUNCTION(picohttpparser)
{
php_info_print_table_start();
php_info_print_table_header(2, "picohttpparser support", "enabled");
php_info_print_table_header(2, "picohttpparser version", PHP_PICOHTTPPARSER_VERSION);
php_info_print_table_header(2, "picohttpparser author", PHP_PICOHTTPPARSER_AUTHOR);
php_info_print_table_end();
}
/* }}} */
zend_module_entry picohttpparser_module_entry = {
STANDARD_MODULE_HEADER,
"picohttpparser", /* extension name */
picohttpparser_functions, /* zend_function_entry */
NULL, /* PHP_MINIT - module initialization */
NULL, /* PHP_MSHUTDOWN - module shutdown */
PHP_RINIT(picohttpparser), /* PHP_RINIT - request initialization */
NULL, /* PHP_RSHUTDOWN - request shutdown */
PHP_MINFO(picohttpparser), /* PHP_MINFO - module information */
PHP_PICOHTTPPARSER_VERSION, /* module version */
STANDARD_MODULE_PROPERTIES};
#ifdef COMPILE_DL_PICOHTTPPARSER
#ifdef ZTS
ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(picohttpparser)
#endif