Skip to content

Commit

Permalink
fix User-Agent bug (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
rungobier authored Dec 17, 2021
1 parent bd06ad9 commit 79f6e5f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pocsuite3/lib/request/patch/hook_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _merge_retain_none(request_setting, session_setting, dict_class=OrderedDict)
# Create the Request.
merged_cookies = merge_cookies(merge_cookies(RequestsCookieJar(), self.cookies),
cookies or (conf.cookie if 'cookie' in conf else None))
if not conf.agent:
if not conf.agent and HTTP_HEADER.USER_AGENT not in conf.http_headers:
conf.http_headers[HTTP_HEADER.USER_AGENT] = generate_random_user_agent()

req = Request(
Expand Down

0 comments on commit 79f6e5f

Please sign in to comment.