Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
KazuCocoa committed Oct 16, 2024
1 parent e440727 commit 090b6e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions appium/webdriver/appium_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ class AppiumConnection(RemoteConnection):
def get_remote_connection_headers(cls, parsed_url: 'ParseResult', keep_alive: bool = True) -> Dict[str, Any]:
"""Override get_remote_connection_headers in RemoteConnection"""
headers = RemoteConnection.get_remote_connection_headers(parsed_url, keep_alive=keep_alive)
# e.g. appium/0.49 (selenium/3.141.0 (python linux))
# headers['User-Agent'] = f'{PREFIX_HEADER}{library_version()} ({headers["User-Agent"]})'
if parsed_url.path.endswith('/session'):
# https://github.com/appium/appium-base-driver/pull/400
headers['X-Idempotency-Key'] = str(uuid.uuid4())
RemoteConnection.extra_headers = {'X-Idempotency-Key': str(uuid.uuid4())}
else:
RemoteConnection.extra_headers = {}

return headers

0 comments on commit 090b6e8

Please sign in to comment.