mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-04-24 04:14:57 +08:00
Py3: UASTRINGS should be indexed by and return bytes
This commit is contained in:
committed by
Maximilian Hils
parent
da38ce2e6e
commit
78b2fa3a13
@@ -88,7 +88,7 @@ class ShortcutUserAgent(_HeaderMixin, base.OptionsOrValue):
|
||||
def values(self, settings):
|
||||
value = self.value.val
|
||||
if self.option_used:
|
||||
value = user_agents.get_by_shortcut(value.lower())[2]
|
||||
value = user_agents.get_by_shortcut(value.lower().decode())[2].encode()
|
||||
|
||||
return self.format_header(
|
||||
self.key.get_generator(settings),
|
||||
|
||||
Reference in New Issue
Block a user