mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
Merge branch 'fix_invalid_tcp_close'
This commit is contained in:
commit
1e733f3149
@ -3,8 +3,13 @@ python:
|
||||
- "2.7"
|
||||
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
|
||||
install:
|
||||
- "pip install coveralls --use-mirrors"
|
||||
- "pip install nose-cov --use-mirrors"
|
||||
- "pip install -r requirements.txt --use-mirrors"
|
||||
- "pip install --upgrade git+https://github.com/mitmproxy/netlib.git"
|
||||
- "pip install --upgrade git+https://github.com/mitmproxy/pathod.git"
|
||||
# command to run tests, e.g. python setup.py test
|
||||
script: nosetests
|
||||
script:
|
||||
- "nosetests --with-cov --cov-report term-missing"
|
||||
after_success:
|
||||
- coveralls
|
@ -1,3 +1,5 @@
|
||||
[![Build Status](https://travis-ci.org/mitmproxy/mitmproxy.png)](https://travis-ci.org/mitmproxy/mitmproxy) [![Coverage Status](https://coveralls.io/repos/mitmproxy/mitmproxy/badge.png)](https://coveralls.io/r/mitmproxy/mitmproxy)
|
||||
|
||||
__mitmproxy__ is an interactive, SSL-capable man-in-the-middle proxy for HTTP
|
||||
with a console interface.
|
||||
|
||||
|
@ -258,13 +258,13 @@ class ProxyHandler(tcp.BaseHandler):
|
||||
else:
|
||||
response = response_reply
|
||||
self.send_response(response)
|
||||
if request and http.request_connection_close(request.httpversion, request.headers):
|
||||
if request and http.connection_close(request.httpversion, request.headers):
|
||||
return
|
||||
# We could keep the client connection when the server
|
||||
# connection needs to go away. However, we want to mimic
|
||||
# behaviour as closely as possible to the client, so we
|
||||
# disconnect.
|
||||
if http.response_connection_close(response.httpversion, response.headers):
|
||||
if http.connection_close(response.httpversion, response.headers):
|
||||
return
|
||||
except (IOError, ProxyError, http.HttpError, tcp.NetLibError), e:
|
||||
if hasattr(e, "code"):
|
||||
|
15
requirements.txt
Normal file
15
requirements.txt
Normal file
@ -0,0 +1,15 @@
|
||||
Flask>=0.9
|
||||
Jinja2>=2.7
|
||||
MarkupSafe>=0.18
|
||||
PIL>=1.1.7
|
||||
Werkzeug>=0.8.3
|
||||
lxml>=3.2.1
|
||||
netlib>=0.9.2
|
||||
nose>=1.3.0
|
||||
pathod>=0.9.2
|
||||
pyOpenSSL>=0.13
|
||||
pyasn1>=0.1.7
|
||||
requests>=1.2.2
|
||||
urwid>=1.1.1
|
||||
wsgiref>=0.1.2
|
||||
jsbeautifier>=1.4.0
|
Loading…
Reference in New Issue
Block a user