mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-03 20:29:28 -05:00
auth zone: default is https if no 'http://' given.
git-svn-id: file:///svn/unbound/trunk@4536 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
a554c14f18
commit
a901fc5fe7
1 changed files with 4 additions and 4 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue