mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-06-16 02:15:48 +00:00
fixed php body read
This commit is contained in:
+2
-1
@@ -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" />
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user