projects
/
m6w6
/
ext-http
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
| inline |
side by side
(parent:
d9d2df7
)
fix http_get_request_body[_stream]() with FastCGI SAPI
author
Michael Wallner
<mike@php.net>
Thu, 30 Jul 2009 08:08:37 +0000
(08:08 +0000)
committer
Michael Wallner
<mike@php.net>
Thu, 30 Jul 2009 08:08:37 +0000
(08:08 +0000)
http_api.c
patch
|
blob
|
history
package2.xml
patch
|
blob
|
history
diff --git
a/http_api.c
b/http_api.c
index 4fa8c3d5b703203f92b84c083e421500bc7f8a9b..06ac89a176d271e16ac74e11cf8b6eadec9a0661 100644
(file)
--- a/
http_api.c
+++ b/
http_api.c
@@
-357,6
+357,9
@@
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 < sizeof(buf)) {
+ break;
+ }
}
/* check for error */
@@
-395,6
+398,9
@@
PHP_HTTP_API php_stream *_http_get_request_body_stream(TSRMLS_D)
while (0 < (len = sapi_module.read_post(buf, sizeof(buf) TSRMLS_CC))) {
php_stream_write(s, buf, len);
+ if (len < sizeof(buf)) {
+ break;
+ }
}
if (len < 0) {
diff --git
a/package2.xml
b/package2.xml
index fa3c60068284c14f5437e2a16b2909f281eafa5c..f11b5d2b0d9a28055556ec4402ba3cb066c5220b 100644
(file)
--- a/
package2.xml
+++ b/
package2.xml
@@
-40,6
+40,7
@@
support. Parallel requests are available for PHP 5 and greater.
<license>BSD, revised</license>
<notes><![CDATA[
* Fixed PHP5.1 build
+* Fixed http_get_request_body[_stream]() with FastCGI SAPI
]]></notes>
<contents>
<dir name="/">