X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_api.c;h=1943e126a1f4d5193c6ca36d26e75cb09a71097a;hp=4f1b7e387e9b6283d2d2c41bc459d02a39bae645;hb=1e9ae509c5c6423114e0c6c874ee224cd999795e;hpb=ac73b47af7c48397dc9a6e07872062b3c3619813 diff --git a/http_api.c b/http_api.c index 4f1b7e3..1943e12 100644 --- a/http_api.c +++ b/http_api.c @@ -360,7 +360,7 @@ PHP_HTTP_API STATUS _http_get_request_body_ex(char **body, size_t *length, zend_ memcpy(*body + *length, buf, len); *length += len; (*body)[*length] = '\0'; - if (len < (int) sizeof(buf)) { + if (len < 4096) { break; } } @@ -402,7 +402,7 @@ PHP_HTTP_API php_stream *_http_get_request_body_stream(TSRMLS_D) while (0 < (len = sapi_module.read_post(buf, 4096 TSRMLS_CC))) { php_stream_write(s, buf, len); - if (len < (int) sizeof(buf)) { + if (len < 4096) { break; } }