changeset 83:0ad8957eb3a9

use strrchr to get port. Noticed an ipv6 --http-socket=[::]:80 had a bad port. commit 43bd09d6ee3fc46dfc7795ac6a9b5ca34ef61f65
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 14 Jun 2020 22:45:26 +0200
parents 77ed99bd6c71
children 67e3c22ae581
files uwsginl/files/patch-plugins_corerouter_cr__common.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/uwsginl/files/patch-plugins_corerouter_cr__common.c	Sun Jun 14 22:45:26 2020 +0200
@@ -0,0 +1,11 @@
+--- plugins/corerouter/cr_common.c.orig	2020-06-14 20:44:20 UTC
++++ plugins/corerouter/cr_common.c
+@@ -62,7 +62,7 @@ void uwsgi_corerouter_setup_sockets(struct uwsgi_corer
+ 
+ 				// fix SERVER_PORT
+ 				if (!ugs->port || !ugs->port_len) {
+-					ugs->port = strchr(ugs->name, ':');
++					ugs->port = strrchr(ugs->name, ':');
+ 					if (ugs->port) {
+ 						ugs->port++;
+ 						ugs->port_len = strlen(ugs->port);