diff options
author | Maximilian Hils <git@maximilianhils.com> | 2014-09-07 03:18:18 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2014-09-07 03:18:18 +0200 |
commit | 5226ac200fb13f1c19a2d91344ae516d32e756e6 (patch) | |
tree | bdf6c18de743dbddb6bd876ab1f3206879c4fe7a /libmproxy/protocol | |
parent | bf5fef1e0b52854683984abb9023a395521d003a (diff) | |
download | mitmproxy-5226ac200fb13f1c19a2d91344ae516d32e756e6.tar.gz mitmproxy-5226ac200fb13f1c19a2d91344ae516d32e756e6.tar.bz2 mitmproxy-5226ac200fb13f1c19a2d91344ae516d32e756e6.zip |
update code docs, make sure that url attribute never returns prettified/formatted values
Diffstat (limited to 'libmproxy/protocol')
-rw-r--r-- | libmproxy/protocol/http.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/libmproxy/protocol/http.py b/libmproxy/protocol/http.py index c67cb471..5d06f1f2 100644 --- a/libmproxy/protocol/http.py +++ b/libmproxy/protocol/http.py @@ -193,11 +193,14 @@ class HTTPRequest(HTTPMessage): method: HTTP method - scheme: URL scheme (http/https) (absolute-form only) + scheme: URL scheme (http/https) - host: Host portion of the URL (absolute-form and authority-form only) + host: Target hostname of the request. This is not neccessarily the directy upstream server (which could be + another proxy), but it's always the target server we want to reach at the end. This attribute is either + inferred from the request itself (absolute-form, authority-form) or from the connection metadata (e.g. the + host in reverse proxy mode). - port: Destination port (absolute-form and authority-form only) + port: Destination port path: Path portion of the URL (not present in authority-form) @@ -501,7 +504,10 @@ class HTTPRequest(HTTPMessage): """ Returns a URL string, constructed from the Request's URL components. """ - return self.pretty_url(False) + return utils.unparse_url(self.scheme, + self.host, + self.port, + self.path).encode('ascii') @url.setter def url(self, url): |