Repository: devopshq/artifactory

Issue:
URL with port issue
If the artifactory URL is `https://example.com:80/artifactory/foo`

Expected quoted URL is 
```
https://example.com:80/artifactory/foo
```
But get the following one
```
https://example.com%3a80/artifactory/foo
```

Discussion:

Patch:
diff --git a/artifactory.py b/artifactory.py
index 6437d37..c1d6588 100755
--- a/artifactory.py
+++ b/artifactory.py
@@ -376,8 +376,16 @@ class nullcontext:
 
 def quote_url(url):
     parsed_url = urllib3.util.parse_url(url)
-    quoted_path = requests.utils.quote(url.rpartition(parsed_url.host)[2])
-    quoted_url = "{}://{}{}".format(parsed_url.scheme, parsed_url.host, quoted_path)
+    if parsed_url.port:
+        quoted_path = requests.utils.quote(
+            url.rpartition(f"{parsed_url.host}:{parsed_url.port}")[2]
+        )
+        quoted_url = (
+            f"{parsed_url.scheme}://{parsed_url.host}:{parsed_url.port}{quoted_path}"
+        )
+    else:
+        quoted_path = requests.utils.quote(url.rpartition(parsed_url.host)[2])
+        quoted_url = "{}://{}{}".format(parsed_url.scheme, parsed_url.host, quoted_path)
 
     return quoted_url
 


Test patch:
diff --git a/tests/unit/test_artifactory_path.py b/tests/unit/test_artifactory_path.py
index 5039aa8..db8cb6b 100644
--- a/tests/unit/test_artifactory_path.py
+++ b/tests/unit/test_artifactory_path.py
@@ -66,6 +66,14 @@ class ArtifactoryFlavorTest(unittest.TestCase):
 
     def test_quote_url(self):
         check = self._check_quote_url
+        check(
+            "https://example.com:80/artifactory/foo",
+            "https://example.com:80/artifactory/foo",
+        )
+        check(
+            "https://example.com:80/artifactory/foo/#1",
+            "https://example.com:80/artifactory/foo/%231",
+        )
         check(
             "https://example.com/artifactory/foo", "https://example.com/artifactory/foo"
         )