mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-05-17 06:09:29 +00:00
Merge pull request #102 from CodeName393/Fix-Rnet-dict-type-error
Fix(session): header handling in session request method
This commit is contained in:
@@ -584,6 +584,10 @@ class RnetSession:
|
|||||||
if rnet_method is None:
|
if rnet_method is None:
|
||||||
raise ValueError(f"Unsupported HTTP method: {method}")
|
raise ValueError(f"Unsupported HTTP method: {method}")
|
||||||
|
|
||||||
|
# Convert headers to standard dict once to resolve PyO3 CaseInsensitiveDict rejection.
|
||||||
|
if kwargs.get("headers") is not None:
|
||||||
|
kwargs["headers"] = dict(kwargs["headers"])
|
||||||
|
|
||||||
# Skip retry for non-allowed methods
|
# Skip retry for non-allowed methods
|
||||||
if method_upper not in self.allowed_methods:
|
if method_upper not in self.allowed_methods:
|
||||||
raw_resp = client.request(rnet_method, url, **kwargs)
|
raw_resp = client.request(rnet_method, url, **kwargs)
|
||||||
|
|||||||
Reference in New Issue
Block a user