Commit Graph

634 Commits

Author SHA1 Message Date
Maximilian Hils
0a1431ed2c fix #1314 2016-07-08 15:50:11 -07:00
Maximilian Hils
7a5b21556b fix tests 2016-07-07 19:34:57 -07:00
Maximilian Hils
00dce24015 tests++ 2016-07-07 18:02:59 -07:00
Maximilian Hils
f62e976e1e py3++ 2016-07-07 17:29:22 -07:00
Maximilian Hils
64a867973d sni is now str, not bytes 2016-07-06 21:03:17 -07:00
Maximilian Hils
9c873d63f4 py3++, multidict fixes
This commit improves Python 3 compatibility and fixes two multidict
issues:

 1. Headers.items(multi=True) now decodes fields
 2. MultiDict.clear(item) has been removed, as Python's
    MutableMapping already defines .clear() with different
    semantics. This is confusing for everyone who expects a
    dict-like object. `.pop("attr", None)` is not fantastic,
    but it's the Python way to do it.
2016-07-06 19:53:29 -07:00
Maximilian Hils
55fae7cea9 Merge pull request #1319 from mitmproxy/fix-py27-encoding-issues
Fix pathod log encoding
2016-07-06 17:35:34 -07:00
Maximilian Hils
444f0a4c39 py3++ 2016-07-06 17:31:08 -07:00
Maximilian Hils
8b564bc934 fix pathod log encoding 2016-07-06 16:47:32 -07:00
Maximilian Hils
e84f5fcc72 Merge pull request #1315 from mitmproxy/better-unicode-handling
remove clean_bin, clarify unicode handling
2016-07-05 16:02:37 -07:00
Maximilian Hils
00a35aa895 Merge pull request #1297 from dufferzafar/py3-flow-export
Python 3 - test_flow_export
2016-07-05 15:17:18 -07:00
Maximilian Hils
d51cf543bb remove clean_bin, clarify unicode handling 2016-07-05 15:11:32 -07:00
Thomas Kriechbaumer
23e295b37e py3: fix bytes vs. str 2016-07-03 23:22:04 +02:00
Shadab Zafar
d361177753 h2: move header parsing to netlib 2016-07-03 18:03:34 +05:30
Shadab Zafar
5b5a3ffa8e netlib: condition on PY2 rather than on PY3
Let's just hope PY4 doesn't break this!
2016-07-02 21:15:20 +05:30
Maximilian Hils
2c09e0416b minor fixes 2016-07-01 17:49:18 -07:00
Maximilian Hils
fa72462798 fix tcp message handling 2016-07-01 17:17:16 -07:00
Maximilian Hils
536c7acd13 py3++ 2016-07-01 14:10:48 -07:00
Shadab Zafar
e0ed7699ca Handle case when scheme is None 2016-07-01 10:23:04 -07:00
Thomas Kriechbaumer
5d0de16f57 http2: improve error handling in tests 2016-06-22 22:09:57 +02:00
Thomas Kriechbaumer
eb3ed87100 move custom HTTP/2 stack from netlib to pathod 2016-06-17 15:06:01 +02:00
Shadab Zafar
d9b940c21e Py3: websockets 2016-06-15 09:49:38 +02:00
Shadab Zafar
0f1aa2b78e Py3: fix http2 bytes issue 2016-06-15 09:49:38 +02:00
Aldo Cortesi
a63817f2b8 Merge pull request #1253 from mhils/fix-debug
Fix Debug Mode on Windows
2016-06-14 17:12:02 +12:00
Aldo Cortesi
e6fd98bb72 Start rolling out leak detection in netlib 2016-06-14 14:32:18 +12:00
Maximilian Hils
3c9a70b761 fix debug mode on Windows 2016-06-13 18:06:44 -07:00
Aldo Cortesi
e58a2bf095 Merge branch 'master' into appveyor 2016-06-12 11:27:16 +12:00
Aldo Cortesi
dc545ca0f6 Make the tcp connection closer cancellable
And use this to make pathoc error handling more sophisticated
2016-06-12 11:17:05 +12:00
Aldo Cortesi
728d5caa22 Fold mitmproxy.version and pathod.version into netlib.version 2016-06-12 10:29:12 +12:00
Aldo Cortesi
e9f8eb1f6b Satisfy lint 2016-06-11 23:13:41 +12:00
Aldo Cortesi
7b86560ded debug: On SIGUSR2, we dump tracebacks for all threads to screen 2016-06-11 23:07:42 +12:00
Aldo Cortesi
53b2fd545b Zap stray semicolon 2016-06-11 21:26:38 +12:00
Aldo Cortesi
5566a1f0e6 debug: num_fds is posix-only 2016-06-11 21:25:34 +12:00
Aldo Cortesi
0848d1085e debug: add OpenSSL 2016-06-11 21:06:41 +12:00
Aldo Cortesi
3f240b1875 debug: verison -> version
@resam blew our sponsorship - t-mobile is up next
2016-06-11 21:04:13 +12:00
Aldo Cortesi
09edbd9492 Improve debugging of thread and other leaks
- 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
2016-06-11 19:52:24 +12:00
Aldo Cortesi
5b9f07c81c debug.sysinfo: tests and coverage 2016-06-11 17:56:17 +12:00
Aldo Cortesi
e367b88195 Add a --sysinfo flag to all daemons
This dumps all the platform information and mitmproxy version data we'd
normally need to troubleshoot an issue.
2016-06-11 16:40:21 +12:00
Aldo Cortesi
c421c41307 Remove odict
- 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
2016-06-09 13:28:43 +12:00
Maximilian Hils
c98c83190b tests++ 2016-06-07 01:03:08 -07:00
Aldo Cortesi
1ffc273c94 Utils cleanups
- 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.
2016-06-07 17:12:52 +12:00
Maximilian Hils
38d2e6432c minor fixes 2016-06-06 19:10:19 -07:00
Maximilian Hils
7cb7d9ad32 netlib: always disconnect when using context manager 2016-06-06 15:10:03 -07:00
redfast00
a724fd606a
Now keeps header capitalization 2016-06-05 20:47:10 +02:00
Aldo Cortesi
c0c45c051a Fix test that may fail due to binary header data
This is just inherently not a determinisitc test. We don't use the log HTTP
interface any more, so it can just go. A more radical "solution" is inbound
shortly.

Fixes #1207
2016-06-05 11:47:52 +12:00
Aldo Cortesi
6943d7e397 More explicit name for the tcp.Server handler counter 2016-06-03 13:57:12 +12:00
Aldo Cortesi
e60860e65d Make tcp.Client.connect return a context manager that closes the connection 2016-06-03 12:06:36 +12:00
Aldo Cortesi
c5076f5e01 Implement a service connection handler counter, use it in Pathod test suite
Lots of failures, but that's a good thing.
2016-06-03 11:47:07 +12:00
Aldo Cortesi
09da1febbd Shift a bunch more string-related functions to strutils 2016-06-02 13:04:19 +12:00
Aldo Cortesi
cccdc98426 Utils reorganisation: add netlib.strutils
Extract a number of string and format-related functions to netlib.strutils.
2016-06-02 12:31:41 +12:00