projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
aa2e387
)
- skip leading ws in http_parse_headers()
author
Michael Wallner
<mike@php.net>
Wed, 5 Apr 2006 16:34:28 +0000
(16:34 +0000)
committer
Michael Wallner
<mike@php.net>
Wed, 5 Apr 2006 16:34:28 +0000
(16:34 +0000)
http_headers_api.c
patch
|
blob
|
history
diff --git
a/http_headers_api.c
b/http_headers_api.c
index fd94d8e037932cff846c9098fd0fc492e85d7dd7..70f36ce285052578b8df7acc1c4914d1054007f9 100644
(file)
--- a/
http_headers_api.c
+++ b/
http_headers_api.c
@@
-326,11
+326,15
@@
PHP_HTTP_API http_range_status _http_get_request_ranges(HashTable *ranges, size_
PHP_HTTP_API STATUS _http_parse_headers_ex(const char *header, HashTable *headers, zend_bool prettify,
http_info_callback callback_func, void **callback_data TSRMLS_DC)
{
PHP_HTTP_API STATUS _http_parse_headers_ex(const char *header, HashTable *headers, zend_bool prettify,
http_info_callback callback_func, void **callback_data TSRMLS_DC)
{
- const char *colon = NULL, *line =
header
;
+ const char *colon = NULL, *line =
NULL
;
zval array;
INIT_ZARR(array, headers);
zval array;
INIT_ZARR(array, headers);
+ /* skip leading ws */
+ while (isspace(*header)) ++header;
+ line = header;
+
#define MORE_HEADERS (*(line-1) && !(*(line-1) == '\n' && (*line == '\n' || *line == '\r')))
do {
int value_len = 0;
#define MORE_HEADERS (*(line-1) && !(*(line-1) == '\n' && (*line == '\n' || *line == '\r')))
do {
int value_len = 0;