fix: trace was passed in the request method shortened url for trace
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -16,6 +16,7 @@ from .cache import Cache
|
||||
from .rotating import RotatingProxy
|
||||
from ..objects import Target
|
||||
from ..utils import request_trace
|
||||
from ..utils.string_processing import shorten_display_url
|
||||
from ..utils.config import main_settings
|
||||
from ..utils.support_classes.download_result import DownloadResult
|
||||
from ..utils.hacking import merge_args
|
||||
@@ -149,8 +150,6 @@ class Connection:
|
||||
exclude_headers: List[str] = None,
|
||||
**kwargs
|
||||
) -> Optional[requests.Response]:
|
||||
trace_string = f"{method} {url} \t{'[stream]' if kwargs.get('stream', False) else ''}"
|
||||
|
||||
if method is None:
|
||||
raise AttributeError("method is not set.")
|
||||
method = method.upper()
|
||||
@@ -163,6 +162,7 @@ class Connection:
|
||||
current_kwargs.update(**kwargs)
|
||||
|
||||
parsed_url = urlparse(url)
|
||||
trace_string = f"{method} {shorten_display_url(url)} \t{'[stream]' if kwargs.get('stream', False) else ''}"
|
||||
|
||||
if not raw_headers:
|
||||
_headers = copy.copy(self.HEADER_VALUES)
|
||||
|
Reference in New Issue
Block a user