From 69677193bd7f38cdc8b006f548eeb607bcb793b4 Mon Sep 17 00:00:00 2001 From: Roberto De Ioris Date: Sat, 4 Oct 2014 12:06:16 +0200 Subject: [PATCH] fixed REMOTE_ADDR in HTTP/1.1 mode --- proto/http.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proto/http.c b/proto/http.c index 9ab0beee..9097e962 100644 --- a/proto/http.c +++ b/proto/http.c @@ -670,6 +670,8 @@ void uwsgi_proto_http11_close(struct wsgi_request *wsgi_req) { int uwsgi_proto_http11_accept(struct wsgi_request *wsgi_req, int fd) { if (wsgi_req->socket->retry[wsgi_req->async_id]) { wsgi_req->fd = wsgi_req->socket->fd_threads[wsgi_req->async_id]; + wsgi_req->c_len = sizeof(struct sockaddr_un); + getsockname(wsgi_req->fd, (struct sockaddr *) &wsgi_req->c_addr, (socklen_t *) &wsgi_req->c_len); int ret = uwsgi_wait_read_req(wsgi_req); if (ret <= 0) { close(wsgi_req->fd);