From a4c4b7e8d28d45c2bf0809fc4237dfebbc3421cf Mon Sep 17 00:00:00 2001 From: "roberto@quantal64" Date: Tue, 4 Sep 2012 18:13:16 +0200 Subject: [PATCH] fixed uwsgi_buffer realloc --- core/buffer.c | 1 + welcome.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/buffer.c b/core/buffer.c index 4a629be0d2..22cf7c6126 100644 --- a/core/buffer.c +++ b/core/buffer.c @@ -23,6 +23,7 @@ int uwsgi_buffer_append(struct uwsgi_buffer *ub, char *buf, size_t len) { uwsgi_error("realloc()"); return -1; } + ub->buf = new_buf; } memcpy(ub->buf + ub->pos, buf, len); diff --git a/welcome.py b/welcome.py index 79e675d78f..37681868e6 100644 --- a/welcome.py +++ b/welcome.py @@ -135,7 +135,7 @@ def application(env, start_response): """ % (uwsgi.version, uwsgi.hostname, env.get('REMOTE_USER','None'), workers) - start_response('200 OK', [('Content-Type', 'text/html'), ('Content-Length', str(len(output)) )]) + start_response('200 %s' % ('x' * 10000), [('Content-Type', 'text/html'), ('Content-Length', str(len(output)) )]) #return bytes(output.encode('latin1')) return output