diff --git a/hello_world.py b/hello_world.py index c296b791..a8c13b93 100644 --- a/hello_world.py +++ b/hello_world.py @@ -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')]) diff --git a/plugins/corerouter/corerouter.c b/plugins/corerouter/corerouter.c index 0b5b08bc..02d8000a 100644 --- a/plugins/corerouter/corerouter.c +++ b/plugins/corerouter/corerouter.c @@ -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); diff --git a/plugins/router_uwsgi/router_uwsgi.c b/plugins/router_uwsgi/router_uwsgi.c index bbb206a4..d4303635 100644 --- a/plugins/router_uwsgi/router_uwsgi.c +++ b/plugins/router_uwsgi/router_uwsgi.c @@ -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; }