Commit Graph

38 Commits

Author SHA1 Message Date
Sam Cleveland
6689a342ae Porting to Python 3.4
Fixed byte string formatting for hexdump.

= test session starts =
platform darwin -- Python 3.4.1, pytest-2.8.2, py-1.4.30, pluggy-0.3.1
rootdir: /Users/samc/src/python/netlib, inifile:
collected 11 items

netlib/test/test_utils.py ...........

= 11 passed in 0.23 seconds =
2015-11-11 19:53:51 -06:00
Sam Cleveland
2d48f12332 Revert "Porting netlib to python3.4"
This reverts commit 8237183485.
2015-11-11 19:41:42 -06:00
Sam Cleveland
8237183485 Porting netlib to python3.4
Updated utils.py using 2to3-3.4
Updated hexdump to use .format() with .encode() to support python 3.4
Python 3.5 supports .format() on bytes objects, but 3.4 is the current
default on Ubuntu.

samc$ py.test netlib/test/test_utils.py
= test session starts =
platform darwin -- Python 3.4.1, pytest-2.8.2, py-1.4.30, pluggy-0.3.1
rootdir: /Users/samc/src/python/netlib, inifile:
collected 11 items

netlib/test/test_utils.py ...........

= 11 passed in 0.19 seconds =
2015-11-11 11:32:02 -06:00
Maximilian Hils
67229fbdf7 Merge branch 'http-models' 2015-09-28 13:53:59 +02:00
Maximilian Hils
87566da3ba fix mitmproxy/mitmproxy#784 2015-09-28 11:18:00 +02:00
Maximilian Hils
106f7046d3 refactor request model 2015-09-26 00:39:04 +02:00
Maximilian Hils
45f2ea33b2 minor fixes 2015-09-25 18:24:18 +02:00
Maximilian Hils
f937522773 Headers: return str on all Python versions 2015-09-22 01:48:35 +02:00
Maximilian Hils
1ff8f294b4 minor encoding fixes 2015-09-21 18:34:43 +02:00
Maximilian Hils
73586b1be9 python 3++ 2015-09-21 00:44:17 +02:00
Maximilian Hils
693cdfc6d7 python3++ 2015-09-20 19:40:09 +02:00
Maximilian Hils
d798ed955d python3++ 2015-09-17 16:31:50 +02:00
Maximilian Hils
8d71059d77 clean up http message models 2015-09-17 15:16:12 +02:00
Maximilian Hils
a077d8877d finish netlib.http.http1 refactor 2015-09-16 00:04:23 +02:00
Maximilian Hils
11e7f476bd wip 2015-09-15 19:12:15 +02:00
Maximilian Hils
997fcde8ce make clean_bin unicode-aware 2015-09-12 17:03:09 +02:00
Maximilian Hils
66ee1f465f headers: adjust everything 2015-09-05 18:15:47 +02:00
Maximilian Hils
982d8000c4 wip 2015-08-28 17:35:48 +02:00
Thomas Kriechbaumer
ff27d65f08 cleanup whitespace 2015-08-10 20:44:36 +02:00
Thomas Kriechbaumer
690b8b4f4e add move tests and code from mitmproxy 2015-08-10 20:34:27 +02:00
Thomas Kriechbaumer
0be84fd6b9 fix tutils imports 2015-08-01 14:49:15 +02:00
Thomas Kriechbaumer
a837230320 move code from mitmproxy to netlib 2015-08-01 12:40:40 +02:00
Thomas Kriechbaumer
c7fcc2cca5 add on-the-wire representation methods 2015-07-29 11:27:43 +02:00
Aldo Cortesi
239f4758af Remove dependence on pathod in test suite. 2015-06-23 22:16:03 +12:00
Thomas Kriechbaumer
836b1eab97 fix warnings and code smells
use prospector to find them
2015-06-17 13:10:27 +02:00
Thomas Kriechbaumer
e3d390e036 cleanup code with autopep8
run the following command:
  $ autopep8 -i -r -a -a .
2015-05-27 11:19:11 +02:00
Aldo Cortesi
4dce7ee074 websockets: more compact and legible human_readable 2015-04-30 12:10:08 +12:00
Aldo Cortesi
8086022920 Add a tiny utility class for keeping bi-directional mappings.
Use it in websocket and socks.
2015-04-30 09:04:22 +12:00
Aldo Cortesi
f22bc0b4c7 websocket: interface refactoring
- Separate out FrameHeader. We need to deal with this separately in many circumstances.
- Simpler equality scheme.
- Bits are now specified by truthiness - we don't care about the integer value.
This means lots of validation is not needed any more.
2015-04-24 15:09:21 +12:00
Aldo Cortesi
7d83e388aa Whitespace, pep8, mixed indentation 2015-04-21 11:19:00 +12:00
Aldo Cortesi
2c660d7633 Migrate requeset reading from mitmproxy to netlib 2015-04-21 11:05:12 +12:00
Chandler Abraham
e41e5cbfdd netlib websockets 2015-04-10 18:37:41 -07:00
Maximilian Hils
6d1b601ddf minor cleanups 2014-08-16 15:53:07 +02:00
Maximilian Hils
e69133f98c remove ntop windows workaround 2014-06-25 21:16:47 +02:00
Maximilian Hils
dc3d3e5f0a add inet_ntop/inet_pton functions 2014-06-25 20:31:10 +02:00
Aldo Cortesi
5a050bb6b2 Tighten up checks on port ranges and path character sets. 2013-03-03 21:39:15 +13:00
Aldo Cortesi
064b4c8001 Make cleanBin escape carriage returns.
We get confusing output on terminals if we leave \r unescaped.
2012-09-27 10:59:46 +12:00
Aldo Cortesi
b308824193 Create netlib.utils, move cleanBin and hexdump from libmproxy.utils. 2012-09-24 11:21:48 +12:00