fixed php body read

This commit is contained in:
Unbit
2013-03-08 20:23:09 +01:00
parent e29c50c9a5
commit fba0d196ff
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -15,10 +15,11 @@ rpc result:<br/>
<?
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
uwsgi_cache_update('foobar', $_POST['cache_val']);
echo uwsgi_cache_update('foobar', $_POST['cache_val']);
}
?>
cache value: <?= uwsgi_cache_get('foobar') ?><br/>
<form method="POST">
<input type="text" name="cache_val" value="<?=uwsgi_cache_get('foobar')?>"/>
<input type="submit" value="cache set" />
+1
View File
@@ -121,6 +121,7 @@ static int sapi_uwsgi_read_post(char *buffer, uint count_bytes TSRMLS_DC)
char *buf = uwsgi_request_body_read(wsgi_req, count_bytes - read_bytes, &rlen);
if (buf == uwsgi.empty) break;
if (buf) {
memcpy(buffer, buf, rlen);
read_bytes += rlen;
continue;
}