diff --git a/.travis.yml b/.travis.yml index ae4a96414..ce813654e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: python sudo: false python: - "2.7" -# - pypy # pypy 2.5.0 has a regression bug which breaks our test suite. + - pypy # command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors install: - "pip install --upgrade --src . -r requirements.txt" @@ -20,4 +20,4 @@ notifications: cache: directories: - /home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages - - /home/travis/virtualenv/pypy-2.4.0/site-packages + - /home/travis/virtualenv/pypy-2.5.0/site-packages diff --git a/libmproxy/flow.py b/libmproxy/flow.py index f9e2b94d4..d42bbb121 100644 --- a/libmproxy/flow.py +++ b/libmproxy/flow.py @@ -309,10 +309,10 @@ class StickyCookieState: # FIXME: We now know that Cookie.py screws up some cookies with # valid RFC 822/1123 datetime specifications for expiry. Sigh. c = Cookie.SimpleCookie(str(i)) - m = c.values()[0] - k = self.ckey(m, f) - if self.domain_match(f.request.host, k[0]): - self.jar[self.ckey(m, f)] = m + for m in c.values(): + k = self.ckey(m, f) + if self.domain_match(f.request.host, k[0]): + self.jar[k] = m def handle_request(self, f): l = [] diff --git a/setup.py b/setup.py index 953df2bb2..fde6ff66c 100644 --- a/setup.py +++ b/setup.py @@ -33,8 +33,7 @@ script_deps = { for script in scripts: deps.update(script_deps[script]) if os.name == "nt": - deps.add("pydivert>=0.0.4") # Transparent proxying on Windows - + deps.add("pydivert>=0.0.7") # Transparent proxying on Windows setup( name="mitmproxy", @@ -55,6 +54,8 @@ setup( "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Security", "Topic :: Internet", "Topic :: Internet :: WWW/HTTP", @@ -63,7 +64,7 @@ setup( ], packages=find_packages(), include_package_data=True, - scripts = scripts, + scripts=scripts, install_requires=list(deps), extras_require={ 'dev': [ diff --git a/test/test_flow.py b/test/test_flow.py index 6230ad73c..1b796e4c6 100644 --- a/test/test_flow.py +++ b/test/test_flow.py @@ -47,7 +47,7 @@ class TestStickyCookieState: assert s.domain_match("google.com", ".google.com") def test_handle_response(self): - c = "SSID=mooo, FOO=bar; Domain=.google.com; Path=/; "\ + c = "SSID=mooo; domain=.google.com, FOO=bar; Domain=.google.com; Path=/; "\ "Expires=Wed, 13-Jan-2021 22:23:01 GMT; Secure; " s, f = self._response(c, "host")