Skip to content

Commit 2946610

Browse files
adamtheturtleclaude
andcommitted
Replace urljoin with string concatenation for base URL construction
urljoin(base, path) silently drops any path prefix from the base URL when path starts with '/', so base_vws_url values like 'http://localhost/mock' would have '/mock' ignored. String concatenation preserves the full base URL path as intended. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d16decf commit 2946610

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/vws/_vws_request.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
API.
33
"""
44

5-
from urllib.parse import urljoin
6-
75
import requests
86
from beartype import BeartypeConf, beartype
97
from vws_auth_tools import authorization_header, rfc_1123_date
@@ -64,7 +62,7 @@ def target_api_request(
6462
**extra_headers,
6563
}
6664

67-
url = urljoin(base=base_vws_url, url=request_path)
65+
url = base_vws_url.rstrip("/") + request_path
6866

6967
requests_response = requests.request(
7068
method=method,

0 commit comments

Comments
 (0)