aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/language/http.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2015-06-27 10:35:32 +1200
committerAldo Cortesi <aldo@nullcube.com>2015-06-27 10:35:32 +1200
commite3c869e4c9ef740c0d80d83adb605094e819b23f (patch)
treeb3aa3eb84d665397ebd9599cc13470294200435a /libpathod/language/http.py
parent61679acf56a28e8a2bfb491f0dd33a079f84cdf7 (diff)
parent31b0d77507066e226d914859283a40549af0fc3e (diff)
downloadmitmproxy-e3c869e4c9ef740c0d80d83adb605094e819b23f.tar.gz
mitmproxy-e3c869e4c9ef740c0d80d83adb605094e819b23f.tar.bz2
mitmproxy-e3c869e4c9ef740c0d80d83adb605094e819b23f.zip
Merge branch 'master' of ssh.github.com:mitmproxy/pathod
Diffstat (limited to 'libpathod/language/http.py')
-rw-r--r--libpathod/language/http.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/libpathod/language/http.py b/libpathod/language/http.py
index 3979a1ee..3c9df484 100644
--- a/libpathod/language/http.py
+++ b/libpathod/language/http.py
@@ -82,12 +82,10 @@ class ShortcutUserAgent(_HeaderMixin, base.OptionsOrValue):
key = base.TokValueLiteral("User-Agent")
def values(self, settings):
+ value = self.value.val
if self.option_used:
- value = http_uastrings.get_by_shortcut(
- self.value.val.lower()
- )[2]
- else:
- value = self.value.val
+ value = http_uastrings.get_by_shortcut(value.lower())[2]
+
return self.format_header(
self.key.get_generator(settings),
value
@@ -143,12 +141,12 @@ class _HTTPMessage(message.Message):
class Response(_HTTPMessage):
unique_name = None
comps = (
- Body,
Header,
ShortcutContentType,
ShortcutLocation,
Raw,
Reason,
+ Body,
actions.PauseAt,
actions.DisconnectAt,
@@ -256,12 +254,12 @@ class NestedResponse(base.NestedMessage):
class Request(_HTTPMessage):
comps = (
- Body,
Header,
ShortcutContentType,
ShortcutUserAgent,
Raw,
NestedResponse,
+ Body,
Times,
actions.PauseAt,