From 4415b9a1a61d0314a971dfd38b9f300ba51fe884 Mon Sep 17 00:00:00 2001 From: Mike Mead Date: Thu, 31 Mar 2016 10:50:13 +0100 Subject: [PATCH] Add support for reverse proxy HTTPS backend --- src/reqs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/reqs.c b/src/reqs.c index d0f296f..67d5d25 100644 --- a/src/reqs.c +++ b/src/reqs.c @@ -188,8 +188,8 @@ static int strip_return_port (char *host) /* * Pull the information out of the URL line. * This expects urls with the initial '://' - * part stripped and hence can handle http urls, - * (proxied) ftp:// urls and https-requests that + * part stripped and hence can handle http urls, https + * urls, (proxied) ftp:// urls and https-requests that * come in without the proto:// part via CONNECT. */ static int extract_url (const char *url, int default_port, @@ -378,7 +378,7 @@ BAD_REQUEST_ERROR: } #endif - if (strncasecmp (url, "http://", 7) == 0 + if (strncasecmp (url, "http://", 7) == 0 || strncasecmp (url, "https://", 8) == 0 || (UPSTREAM_CONFIGURED () && strncasecmp (url, "ftp://", 6) == 0)) { char *skipped_type = strstr (url, "//") + 2;