aboutsummaryrefslogtreecommitdiffstats
path: root/test/netlib
Commit message (Collapse)AuthorAgeFilesLines
...
* | message.content -> .raw_content, implement .textMaximilian Hils2016-07-022-52/+105
|/ | | | | | | | | | | | | | | This PR improves our handling of HTTP message body encodings: - The unaltered message body is now accessible as `.raw_content` - The "content-encoding"-decoded content (i.e. gzip removed) content is not `.content`, as this is what we want in 99% of the cases. - `.text` now provides the "content-encoding"-decoded and then "content-type charset"-decoded message body. - The decoded values for `.content` and `.text` are cached, so that repeated access and `x.text = x.text` is cheap. - The `decoded()` decorator is now deprecated, as we can now just use `.content`. Similarly `HTTPMessage.get_decoded_content()` is deprecated.
* minor fixesMaximilian Hils2016-07-011-5/+5
|
* py3++Maximilian Hils2016-07-011-4/+0
|
* move custom HTTP/2 stack from netlib to pathodThomas Kriechbaumer2016-06-172-544/+1
|
* Merge pull request #1253 from mhils/fix-debugAldo Cortesi2016-06-141-0/+4
|\ | | | | Fix Debug Mode on Windows
| * fix debug mode on WindowsMaximilian Hils2016-06-131-0/+4
| |
* | Fix Python3 testsAldo Cortesi2016-06-141-1/+1
| |
* | Satisfy lintAldo Cortesi2016-06-141-1/+1
| |
* | Use handlers in http2 test suiteAldo Cortesi2016-06-141-100/+100
| |
* | Start rolling out leak detection in netlibAldo Cortesi2016-06-142-211/+221
|/
* debug: On SIGUSR2, we dump tracebacks for all threads to screenAldo Cortesi2016-06-111-0/+6
|
* Improve debugging of thread and other leaksAldo Cortesi2016-06-111-0/+8
| | | | | | | - Add basethread.BaseThread that all threads outside of test suites should use - Add a signal handler to mitmproxy, mitmdump and mitmweb that dumps resource information to screen when SIGUSR1 is received. - Improve thread naming throughout to make thread dumps understandable
* debug.sysinfo: tests and coverageAldo Cortesi2016-06-111-0/+6
|
* Remove odictAldo Cortesi2016-06-092-147/+0
| | | | | | | | - Adds default implementations for _kconv and _reduce_values to MultiDict. Without these, operations fail in really, really non-obvious ways. - Replace the remaining few instances of ODict Fixes #1159
* tests++Maximilian Hils2016-06-071-1/+23
|
* Utils cleanupsAldo Cortesi2016-06-071-0/+9
| | | | | | | | - Move more stuff that belongs in netlib.human - Move some stuff to near the only use - Zap mitmproxy.utils.timestamp(). I see the rationale, but we used it interchangeably with time.time() throughout the project. Since time.time() dominates in the codebase and timestamp() is such low utility, away it goes.
* fix multidict unittestsredfast002016-06-051-2/+2
|
* Shift a bunch more string-related functions to strutilsAldo Cortesi2016-06-022-4/+23
|
* Utils reorganisation: add netlib.strutilsAldo Cortesi2016-06-022-37/+40
| | | | Extract a number of string and format-related functions to netlib.strutils.
* be more strict about module namespacesMaximilian Hils2016-05-311-2/+1
|
* http2.frame -> http2.framereaderAldo Cortesi2016-05-311-3/+3
|
* Fix test failuresAldo Cortesi2016-05-311-1/+1
|
* Satisfy flake8Aldo Cortesi2016-05-314-0/+4
|
* Unify and make symmetric pretty_size and parse_sizeAldo Cortesi2016-05-311-4/+8
|
* Move human-friendly format functions to netlib.human, remove redundant ↵Aldo Cortesi2016-05-312-7/+31
| | | | implementations
* utils.multipartdecode -> http.multipart.decodeAldo Cortesi2016-05-313-32/+33
| | | | | | also utils.parse_content_type -> http.headers.parse_content_type
* netlib.utils.get_header_tokens -> netlib.http1.read.get_header_tokensAldo Cortesi2016-05-312-12/+12
| | | | Placing this next to its only use.
* Module is part of the name - url.decode, not url.urldecodeAldo Cortesi2016-05-311-20/+20
| | | | A pattern we need to use far more often in the codebase
* Extract url functions from netlib.utils and move to netlib.http.urlAldo Cortesi2016-05-312-64/+65
|
* Start cleaning up netlib.utilsAldo Cortesi2016-05-313-40/+40
| | | | | - Remove http2 functions, move to http2.frame - Remove Serializable, move to netlib.basetypes
* Improve handling of pseudo-headersAldo Cortesi2016-05-311-1/+4
| | | | | | | | | - The canonical source for :method, :scheme and :path are the .method, .scheme and .path attributes on the request object. - These pseudo-headers are stripped after reading the request, and re-inserted just before sending. - The :authority header remains, and should be handled analagously to the Host header in HTTP1 with respect to display and user interaction.
* fix headers orderThomas Kriechbaumer2016-05-291-1/+1
|
* more style cleanupThomas Kriechbaumer2016-05-299-10/+12
|
* more style cleanupThomas Kriechbaumer2016-05-294-16/+22
| | | | Use this to check: flake8 --count mitmproxy netlib pathod examples test
* fix testsMaximilian Hils2016-05-283-4/+4
|
* cleanup imports with flake8Thomas Kriechbaumer2016-05-288-10/+6
|
* bytes_to_escaped_str: always escape single quotesMaximilian Hils2016-05-251-0/+2
|
* escaped_str_to_bytes: support unicode on python 2Maximilian Hils2016-05-251-3/+6
|
* Clean un-needed importsAldo Cortesi2016-05-211-2/+0
|
* A clearer implementation of MultiDictViewAldo Cortesi2016-05-211-2/+24
| | | | | | This makes MultiDictView work with a simple getter/setter pair, rather than using attributes with implicit leading underscores. Also move MultiDictView into multidict.py and adds some simple unit tests.
* Merge branch 'multidict' of https://github.com/mhils/mitmproxy into ↵Aldo Cortesi2016-05-217-168/+289
|\ | | | | | | mhils-multidict
| * tests++Maximilian Hils2016-05-202-98/+218
| |
| * improve MultiDict, add ImmutableMultiDict, adjust response.cookiesMaximilian Hils2016-05-183-24/+26
| |
| * add MultiDictMaximilian Hils2016-05-186-46/+45
| | | | | | | | | | | | | | | | This commit introduces MultiDict, a multi-dictionary similar to ODict, but with improved semantics (as in the Headers class). MultiDict fixes a few issues that were present in the Request/Response API. In particular, `request.cookies["foo"] = "bar"` has previously been a no-op, as the cookies property returned a mutable _copy_ of the cookies.
* | clean up odictMaximilian Hils2016-05-181-10/+0
|/
* Sanitize Print (#1135)Maximilian Hils2016-05-121-0/+15
| | | | | | | | * sanitize strings with shell control characters * netlib: add utilities to safe-print bytes * escaped str: add TODO for multi-byte chars
* Merge pull request #1121 from Kriechi/fix-cookiesThomas Kriechbaumer2016-05-113-4/+13
|\ | | | | improve cookie parsing
| * improve cookie parsingThomas Kriechbaumer2016-05-103-4/+13
| | | | | | | | | | allows '/' to be within a cookie name removes deprecated cookie getter/setter fixes #1118
* | actually fix testsMaximilian Hils2016-05-101-2/+2
| |
* | Revert "fix tests"Maximilian Hils2016-05-101-2/+2
| | | | | | | | This reverts commit f315dc1eb9f4701548fd57bbb38de1e9caa34e40.