X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_message_api.c;h=c28ff6f7945c8a152573cf0ea374f06c0c1e497e;hp=77f18e017c25aea336472b50aa50217fd7e10fde;hb=dc7248a073febcade23e6a1a296ab1b2bb752298;hpb=a0bca521b491711e43aef74fe19c23a8eb4d0777 diff --git a/http_message_api.c b/http_message_api.c index 77f18e0..c28ff6f 100644 --- a/http_message_api.c +++ b/http_message_api.c @@ -189,9 +189,9 @@ PHP_HTTP_API http_message *_http_message_parse_ex(http_message *msg, const char ulong total = 0, start = 0, end = 0, len = 0; if (!strncasecmp(Z_STRVAL_P(c), "bytes", lenof("bytes")) && - (Z_STRVAL_P(c)[lenof("bytes")] == '=' || Z_STRVAL_P(c)[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 *start_at = Z_STRVAL_P(c) + sizeof("bytes"); start = strtoul(start_at, &end_at, 10); if (end_at) {