fixed router_uwsgi in http/fastcgi and buffered modes

This commit is contained in:
roberto@quantal64
2012-09-01 08:18:43 +02:00
parent 3cb3c83442
commit 2122bacb33
3 changed files with 8 additions and 2 deletions
+1
View File
@@ -9,6 +9,7 @@ try:
except:
pass
def application(env, start_response):
print env['wsgi.input'].read()
if uwsgi.loop == 'gevent':
gevent.sleep()
start_response('200 OK', [('Content-Type', 'text/html')])
+1 -1
View File
@@ -588,7 +588,7 @@ void uwsgi_corerouter_loop(int id, void *data) {
cr_session->timeout = corerouter_reset_timeout(ucr, cr_session);
// mplementation specific cycle;
// implementation specific cycle;
ucr->switch_events(ucr, cr_session, interesting_fd);
+6 -1
View File
@@ -52,7 +52,12 @@ int uwsgi_routing_func_uwsgi_remote(struct wsgi_request *wsgi_req, struct uwsgi_
return UWSGI_ROUTE_NEXT;
}
if (uwsgi_send_message(uwsgi_fd, uh->modifier1, uh->modifier2, wsgi_req->buffer, wsgi_req->uh.pktsize, wsgi_req->poll.fd, wsgi_req->post_cl, 0) < 0) {
int post_fd = wsgi_req->poll.fd;
if (wsgi_req->async_post) {
post_fd = fileno(wsgi_req->async_post);
}
if (uwsgi_send_message(uwsgi_fd, uh->modifier1, uh->modifier2, wsgi_req->buffer, wsgi_req->uh.pktsize, post_fd, wsgi_req->post_cl, 0) < 0) {
uwsgi_log("unable to send uwsgi request to host %s", addr);
return UWSGI_ROUTE_NEXT;
}