Commit Graph

4 Commits

Author SHA1 Message Date
Shadab Zafar
6f96da08c9 Handle port numbers in host header
from: https://github.com/mitmproxy/netlib/pull/121
2016-02-17 08:48:59 +05:30
Will Coster
0fc348d211 Fix failing unit tests caused by a69d223b 2016-02-15 20:36:21 -08:00
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
Maximilian Hils
d7158f975e move tests into shared folder 2016-02-15 16:34:22 +01:00