projects
/
m6w6
/
ext-http
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
- remove example scripts, as those can be extracted from tutorial.txt with extract.php
[m6w6/ext-http]
/
http_message_api.c
diff --git
a/http_message_api.c
b/http_message_api.c
index fdb0812bf480110edbe593dfdff6b3c102e579a5..d175201913996af652c287015b218d1de52c1842 100644
(file)
--- a/
http_message_api.c
+++ b/
http_message_api.c
@@
-160,7
+160,7
@@
PHP_HTTP_API http_message *_http_message_parse_ex(http_message *msg, const char
char *tmp;
int tmp_len;
char *tmp;
int tmp_len;
- tmp_len = (int) spprintf(&tmp, 0, "%
lu", (ulong)
decoded_len);
+ tmp_len = (int) spprintf(&tmp, 0, "%
zu",
decoded_len);
MAKE_STD_ZVAL(len);
ZVAL_STRINGL(len, tmp, tmp_len, 0);
MAKE_STD_ZVAL(len);
ZVAL_STRINGL(len, tmp, tmp_len, 0);
@@
-188,7
+188,8
@@
PHP_HTTP_API http_message *_http_message_parse_ex(http_message *msg, const char
if (c = http_message_header(msg, "Content-Range")) {
ulong total = 0, start = 0, end = 0, len = 0;
if (c = http_message_header(msg, "Content-Range")) {
ulong total = 0, start = 0, end = 0, len = 0;
- if (!strncasecmp(Z_STRVAL_P(c), "bytes=", lenof("bytes="))) {
+ if (!strncasecmp(Z_STRVAL_P(c), "bytes", lenof("bytes")) &&
+ (Z_STRVAL_P(c)[lenof("bytes")] == '=' || Z_STRVAL_P(c)[lenof("bytes")] == ' ')) {
char *total_at = NULL, *end_at = NULL;
char *start_at = Z_STRVAL_P(c) + lenof("bytes=");
char *total_at = NULL, *end_at = NULL;
char *start_at = Z_STRVAL_P(c) + lenof("bytes=");
@@
-264,7
+265,7
@@
PHP_HTTP_API http_message *_http_message_parse_ex(http_message *msg, const char
char *tmp;
int tmp_len;
char *tmp;
int tmp_len;
- tmp_len = (int) spprintf(&tmp, 0, "%
lu", (ulong)
decoded_len);
+ tmp_len = (int) spprintf(&tmp, 0, "%
zu",
decoded_len);
MAKE_STD_ZVAL(len);
ZVAL_STRINGL(len, tmp, tmp_len, 0);
MAKE_STD_ZVAL(len);
ZVAL_STRINGL(len, tmp, tmp_len, 0);