projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
* rename http_parse_header to http_parse_headers
[m6w6/ext-http]
/
http.c
diff --git
a/http.c
b/http.c
index e7e1960e3b5b5d427e643a0fa19e882837224cb2..6efc142e9745cf43fd8ff9be481736e480d1626c 100644
(file)
--- a/
http.c
+++ b/
http.c
@@
-71,7
+71,7
@@
function_entry http_functions[] = {
PHP_FE(http_send_stream, NULL)
PHP_FE(http_chunked_decode, NULL)
PHP_FE(http_split_response, NULL)
PHP_FE(http_send_stream, NULL)
PHP_FE(http_chunked_decode, NULL)
PHP_FE(http_split_response, NULL)
- PHP_FE(http_parse_header, NULL)
+ PHP_FE(http_parse_header
s
, NULL)
#ifdef HTTP_HAVE_CURL
PHP_FE(http_get, NULL)
PHP_FE(http_head, NULL)
#ifdef HTTP_HAVE_CURL
PHP_FE(http_get, NULL)
PHP_FE(http_head, NULL)
@@
-689,8
+689,8
@@
PHP_FUNCTION(http_split_response)
}
/* }}} */
}
/* }}} */
-/* {{{ proto array http_parse_header(string header) */
-PHP_FUNCTION(http_parse_header)
+/* {{{ proto array http_parse_header
s
(string header) */
+PHP_FUNCTION(http_parse_header
s
)
{
char *header, *rnrn;
int header_len;
{
char *header, *rnrn;
int header_len;
@@
-698,13
+698,13
@@
PHP_FUNCTION(http_parse_header)
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &header, &header_len)) {
RETURN_FALSE;
}
if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &header, &header_len)) {
RETURN_FALSE;
}
-
+
array_init(return_value);
array_init(return_value);
-
- if (rnrn = strstr(header,
"\r\n\r\n"
)) {
+
+ if (rnrn = strstr(header,
HTTP_CRLF HTTP_CRLF
)) {
header_len = rnrn - header + 2;
}
header_len = rnrn - header + 2;
}
- if (SUCCESS != http_parse_header(header, header_len, return_value)) {
+ if (SUCCESS != http_parse_header
s
(header, header_len, return_value)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not parse HTTP header");
zval_dtor(return_value);
RETURN_FALSE;
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not parse HTTP header");
zval_dtor(return_value);
RETURN_FALSE;