mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 07:08:10 +00:00
fix tests, re-enable pypy, do housekeeping
This commit is contained in:
parent
17e44db9fd
commit
2ed09beae4
@ -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
|
||||
|
@ -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 = []
|
||||
|
7
setup.py
7
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': [
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user