From: Wouter Wijngaards Date: Tue, 13 Feb 2018 14:28:51 +0000 (+0000) Subject: auth zone: default is https if no 'http://' given. X-Git-Tag: release-1.7.0rc1~25 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a901fc5fe77373c1ed00344fddf1f6dbdab300b0;p=thirdparty%2Funbound.git auth zone: default is https if no 'http://' given. git-svn-id: file:///svn/unbound/trunk@4536 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/services/authzone.c b/services/authzone.c index 5e26c3087..1da924d84 100644 --- a/services/authzone.c +++ b/services/authzone.c @@ -5916,16 +5916,16 @@ parse_url(char* url, char** host, char** file, int* port, int* ssl) /* parse http://www.example.com/file.htm * or http://127.0.0.1 (index.html) * or https://[::1@1234]/a/b/c/d */ - *ssl = 0; - *port = AUTH_HTTP_PORT; + *ssl = 1; + *port = AUTH_HTTPS_PORT; /* parse http:// or https:// */ if(strncmp(p, "http://", 7) == 0) { p += 7; + *ssl = 0; + *port = AUTH_HTTP_PORT; } else if(strncmp(p, "https://", 8) == 0) { p += 8; - *ssl = 1; - *port = AUTH_HTTPS_PORT; } else if(strstr(p, "://") && strchr(p, '/') > strstr(p, "://") && strchr(p, ':') >= strstr(p, "://")) { char* uri = dup_prefix(p, (size_t)(strstr(p, "://")-p));