projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
gitignore: *.loT
[m6w6/ext-http]
/
src
/
php_http_info.c
diff --git
a/src/php_http_info.c
b/src/php_http_info.c
index 5125a94f2318917369f1d7699dba5ac0f59618e4..48da6bfe2170452f4aa3adb5d2a20d35dabc6ed4 100644
(file)
--- a/
src/php_http_info.c
+++ b/
src/php_http_info.c
@@
-163,7
+163,7
@@
php_http_info_t *php_http_info_parse(php_http_info_t *info, const char *pre_head
PHP_HTTP_INFO(info).response.code = 0;
}
if (EXPECTED(status && end > status)) {
PHP_HTTP_INFO(info).response.code = 0;
}
if (EXPECTED(status && end > status)) {
- while (' ' == *status) ++status;
+ while (' ' == *status
&& end > status
) ++status;
PHP_HTTP_INFO(info).response.status = estrndup(status, end - status);
} else {
PHP_HTTP_INFO(info).response.status = NULL;
PHP_HTTP_INFO(info).response.status = estrndup(status, end - status);
} else {
PHP_HTTP_INFO(info).response.status = NULL;
@@
-182,7
+182,7
@@
php_http_info_t *php_http_info_parse(php_http_info_t *info, const char *pre_head
PHP_HTTP_INFO(info).request.method = estrndup(pre_header, url_len);
PHP_HTTP_INFO(info).request.method = estrndup(pre_header, url_len);
- while (' ' == *url) ++url;
+ while (' ' == *url
&& http > url
) ++url;
while (' ' == *(http-1)) --http;
if (EXPECTED(http > url)) {
while (' ' == *(http-1)) --http;
if (EXPECTED(http > url)) {