fix error in http_get_request_body spottet by rob
authorMichael Wallner <mike@php.net>
Fri, 25 Mar 2011 16:17:58 +0000 (16:17 +0000)
committerMichael Wallner <mike@php.net>
Fri, 25 Mar 2011 16:17:58 +0000 (16:17 +0000)
http_api.c

index 4f1b7e3..1943e12 100644 (file)
@@ -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;
                                }
                        }