diff options
Diffstat (limited to 'utils/nsurl.c')
-rw-r--r-- | utils/nsurl.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/utils/nsurl.c b/utils/nsurl.c index 61799e64c..306f442b6 100644 --- a/utils/nsurl.c +++ b/utils/nsurl.c @@ -853,14 +853,13 @@ static nserror nsurl__create_from_section(const char const *url_s, 1 : 0; sec_start = norm_start + colon - pegs->at + skip; - if (url->scheme != NULL && - strncmp(lwc_string_data( - url->scheme), "http", - SLEN("http")) == 0 && - length - + if (url->scheme != NULL && length - (colon - pegs->at + 1) == 2 && *sec_start == '8' && - *(sec_start + 1) == '0') { + *(sec_start + 1) == '0' && + strncmp(lwc_string_data( + url->scheme), "http", + SLEN("http")) == 0) { /* Scheme is http, and port is default * (80) */ flags |= NSURL_F_NO_PORT; |