Skip to content

Commit 86ba765

Browse files
author
Saurav Tiwary
committed
use temporary variable to generate signature in order to avoid issues
Signed-off-by: Saurav Tiwary <[email protected]>
1 parent 03fa045 commit 86ba765

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

imagekitio/url.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ def build_url(self, options: dict) -> str:
113113
private_key = options.get("private_key")
114114
expiry_timestamp = self.get_signature_timestamp(expire_seconds)
115115

116-
# remove the trailing slash('/') from the netloc since `urlunparse` adds it
117-
result_url_dict["netloc"].rstrip("/")
116+
# Temporary variable to generate the URL signature
117+
modified_result_url_dict = self.prepare_dict_for_unparse(result_url_dict)
118118
intermediate_url = urlunparse(
119-
result_url_dict.get(f, "") for f in ParseResult._fields
119+
modified_result_url_dict.get(f, "") for f in ParseResult._fields
120120
)
121121
url_signature = self.get_signature(
122122
private_key=private_key,

0 commit comments

Comments
 (0)