mitmproxy/netlib
Will Coster a69d223b33 Preserve host header when modifying request path
Currently the path_components and query setters of the Request object
use the url setter under the hood. The url setter updates all parts of
the URL including the host. If the host header and the host in the
request URL are different (as is common when making HTTPS requests)
then the host header will be updated to the value in the URL as a
result of modifying the path.

This change fixes this problem by modifying the query and
path_components setters to not use the url setter and instead directly
update the path field.
2016-02-15 16:21:20 -08:00
..
netlib Preserve host header when modifying request path 2016-02-15 16:21:20 -08:00
README.rst use own shields instance, update pathod readme 2016-02-15 21:13:06 +01:00
setup.cfg add netlib 2016-02-15 14:58:48 +01:00
setup.py add netlib 2016-02-15 14:58:48 +01:00

README.rst

|travis| |coveralls| |downloads| |latest_release| |python_versions|

Netlib is a collection of network utility classes, used by the pathod and
mitmproxy projects. It differs from other projects in some fundamental
respects, because both pathod and mitmproxy often need to violate standards.
This means that protocols are implemented as small, well-contained and flexible
functions, and are designed to allow misbehaviour when needed.


Development
-----------

If you'd like to work on netlib, check out the instructions in mitmproxy's README_.

.. |travis| image:: https://shields.mitmproxy.org/travis/mitmproxy/netlib/master.svg
    :target: https://travis-ci.org/mitmproxy/netlib
    :alt: Build Status

.. |coveralls| image:: https://shields.mitmproxy.org/coveralls/mitmproxy/netlib/master.svg
    :target: https://coveralls.io/r/mitmproxy/netlib
    :alt: Coverage Status

.. |downloads| image:: https://shields.mitmproxy.org/pypi/dm/netlib.svg?color=orange
    :target: https://pypi.python.org/pypi/netlib
    :alt: Downloads

.. |latest_release| image:: https://shields.mitmproxy.org/pypi/v/netlib.svg
    :target: https://pypi.python.org/pypi/netlib
    :alt: Latest Version

.. |python_versions| image:: https://shields.mitmproxy.org/pypi/pyversions/netlib.svg
    :target: https://pypi.python.org/pypi/netlib
    :alt: Supported Python versions

.. _README: https://github.com/mitmproxy/mitmproxy#hacking