From d0a21860876c344ec2b3264f476a863a3cdc2bf4 Mon Sep 17 00:00:00 2001 From: Martin Carroll Date: Thu, 11 Aug 2016 15:18:27 -0400 Subject: [PATCH] fix bug in host extraction when url contains port number When the url contained a port number, the logic was accidentally including the port number when it extracted the hostname from the url. Signed-off-by: Martin Carroll --- src/pymod/pacparser/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pymod/pacparser/__init__.py b/src/pymod/pacparser/__init__.py index f11ba339..a07a67aa 100644 --- a/src/pymod/pacparser/__init__.py +++ b/src/pymod/pacparser/__init__.py @@ -33,7 +33,7 @@ import re import sys -_URL_REGEX = re.compile('^[^:]*:\/\/([^\/]+)') +_URL_REGEX = re.compile('^[^:]*:\/\/([^\/:]+)') class URLError(Exception): def __init__(self, url):