diff -Nru uwsgi-2.0.12/debian/changelog uwsgi-2.0.12/debian/changelog --- uwsgi-2.0.12/debian/changelog 2016-04-13 01:27:16.000000000 -0700 +++ uwsgi-2.0.12/debian/changelog 2017-08-29 13:02:59.000000000 -0700 @@ -1,3 +1,11 @@ +uwsgi (2.0.12-5ubuntu3.1) xenial; urgency=medium + + * Re-add patch cherry-picked upstream to fix apache 2.4 integration + with unix domain sockets (accidentally dropped in 2.0.12-1). + LP: #1501854 + + -- Stefano Rivera Tue, 29 Aug 2017 13:02:59 -0700 + uwsgi (2.0.12-5ubuntu3) xenial; urgency=medium * Build mono bindings on arm64. diff -Nru uwsgi-2.0.12/debian/patches/020151002~ffe57a2.patch uwsgi-2.0.12/debian/patches/020151002~ffe57a2.patch --- uwsgi-2.0.12/debian/patches/020151002~ffe57a2.patch 1969-12-31 16:00:00.000000000 -0800 +++ uwsgi-2.0.12/debian/patches/020151002~ffe57a2.patch 2017-08-29 13:02:21.000000000 -0700 @@ -0,0 +1,52 @@ +Description: Fix apache 2.4 integration with unix domain sockets + Example usage in apache conf: + . + ProxyPass "/foo" "unix:/var/run/uwsgi/foo.socket|uwsgi://uwsgi-uds-foo/" + . + Note: I use uwsgi-uds-foo as hostname instead of localhost because if + you have multiple entrie like these in the same apache conf, apache + thinks it is the same backend even though the unix socket path is + different. So it is mandatory to use different hostnames if you have + multiple app sockets. +Origin: upstream, https://github.com/unbit/uwsgi/commit/6ce856c +Author: Alexandre Rossi +Forwarded: yes +Bug: https://github.com/unbit/uwsgi/issues/973 +Bug: https://github.com/unbit/uwsgi/issues/912 +Bug: https://github.com/unbit/uwsgi/issues/890 +Bug-Debian: https://bugs.debian.org/752783 +Last-Update: 2016-04-29 + +--- a/apache2/mod_proxy_uwsgi.c ++++ b/apache2/mod_proxy_uwsgi.c +@@ -67,20 +67,18 @@ + } + url += sizeof(UWSGI_SCHEME); /* Keep slashes */ + +- // is it a unix socket ? +- if (strlen(url) == 2) { +- *sport = 0; +- } +- else { +- err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, &port); +- if (err) { +- ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, +- "error parsing URL %s: %s", url, err); +- return HTTP_BAD_REQUEST; +- } +- apr_snprintf(sport, sizeof(sport), ":%u", port); ++ err = ap_proxy_canon_netloc(r->pool, &url, NULL, NULL, &host, &port); ++ if (err) { ++ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, ++ "error parsing URL %s: %s", url, err); ++ return HTTP_BAD_REQUEST; + } + ++ if (port != UWSGI_DEFAULT_PORT) ++ apr_snprintf(sport, sizeof(sport), ":%u", port); ++ else ++ sport[0] = '\0'; ++ + if (ap_strchr(host, ':')) { /* if literal IPv6 address */ + host = apr_pstrcat(r->pool, "[", host, "]", NULL); + } diff -Nru uwsgi-2.0.12/debian/patches/series uwsgi-2.0.12/debian/patches/series --- uwsgi-2.0.12/debian/patches/series 2016-03-03 08:16:49.000000000 -0800 +++ uwsgi-2.0.12/debian/patches/series 2017-08-29 13:02:31.000000000 -0700 @@ -1,3 +1,4 @@ +020151002~ffe57a2.patch 020160208~56de205.patch 1001_avoid_setting_RPATH.patch 1002_fix-reload-process-name.patch