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 (from parent 1:
46ef6bd
)
oops, typos causing mem-corruption
author
Michael Wallner
<mike@php.net>
Mon, 11 Apr 2005 10:26:58 +0000
(10:26 +0000)
committer
Michael Wallner
<mike@php.net>
Mon, 11 Apr 2005 10:26:58 +0000
(10:26 +0000)
http_headers_api.c
patch
|
blob
|
history
diff --git
a/http_headers_api.c
b/http_headers_api.c
index 933b4c8b003922b4490e8a442fd2dac30a20c8ae..b9fe7b15b7b582b6d7f98e2908cef91ec83e6282 100644
(file)
--- a/
http_headers_api.c
+++ b/
http_headers_api.c
@@
-267,7
+267,7
@@
PHP_HTTP_API STATUS _http_parse_headers_ex(char *header, size_t header_len,
if ( (!strncmp(header, "HTTP/1.", lenof("HTTP/1."))) ||
(!strncmp(line - lenof("HTTP/1.x\r") + value_len, "HTTP/1.", lenof("HTTP/1.")))) {
if (func) {
if ( (!strncmp(header, "HTTP/1.", lenof("HTTP/1."))) ||
(!strncmp(line - lenof("HTTP/1.x\r") + value_len, "HTTP/1.", lenof("HTTP/1.")))) {
if (func) {
- func(callback_data, header,
header - (line + 1)
, &headers TSRMLS_CC);
+ func(callback_data, header,
line - header + value_len
, &headers TSRMLS_CC);
Z_ARRVAL(array) = headers;
}
} else
Z_ARRVAL(array) = headers;
}
} else
@@
-346,7
+346,7
@@
PHP_HTTP_API void _http_parse_headers_default_callback(void **cb_data, char *htt
/* response */
if (!strncmp(http_line, "HTTP/1.", lenof("HTTP/1."))) {
/* response */
if (!strncmp(http_line, "HTTP/1.", lenof("HTTP/1."))) {
- add_assoc_stringl(&array, "Response Status", http_line + lenof("HTTP/1.x "), line_length - lenof("HTTP/1.x \r\n"),
0
);
+ add_assoc_stringl(&array, "Response Status", http_line + lenof("HTTP/1.x "), line_length - lenof("HTTP/1.x \r\n"),
1
);
} else
/* request */
if (!strncmp(http_line + line_length - lenof("HTTP/1.x\r\n"), "HTTP/1.", lenof("HTTP/1."))) {
} else
/* request */
if (!strncmp(http_line + line_length - lenof("HTTP/1.x\r\n"), "HTTP/1.", lenof("HTTP/1."))) {