# HG changeset patch # User Franz Glasner # Date 1592167398 -7200 # Node ID 77ed99bd6c71685654f0f724105e2956371d4495 # Parent 346c4a4ca40bee12ba6e34f9d1e7ed6472789e44 Correctly handle SERVER_PORT for IPv6 sockets. commit d9346b0b461ea14e234e465e742ee16ec46dacbc diff -r 346c4a4ca40b -r 77ed99bd6c71 uwsginl/files/patch-proto_http.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/uwsginl/files/patch-proto_http.c Sun Jun 14 22:43:18 2020 +0200 @@ -0,0 +1,11 @@ +--- proto/http.c.orig 2020-06-14 20:42:09 UTC ++++ proto/http.c +@@ -276,7 +276,7 @@ static int http_parse(struct wsgi_request *wsgi_req, c + } + } + else { +- char *server_port = strchr(wsgi_req->socket->name, ':'); ++ char *server_port = strrchr(wsgi_req->socket->name, ':'); + if (server_port) { + wsgi_req->uh->pktsize += proto_base_add_uwsgi_var(wsgi_req, "SERVER_PORT", 11, server_port+1, strlen(server_port+1)); + }