Commit Graph

65 Commits

Author SHA1 Message Date
Aldo Cortesi
fb1b9113a1 Try to fix test suite race like a savage. 2015-06-04 19:55:01 +12:00
Aldo Cortesi
80d191ff7c Try to appease Travis 2015-06-04 19:45:22 +12:00
Aldo Cortesi
6122f2da44 Change test API to allow multiple pathoc requests
Add simple unit test for websocket server
2015-05-31 18:38:11 +12:00
Aldo Cortesi
a09f3e06c3 Factor logger out of pathoc, use it in pathod as well. 2015-05-30 17:43:01 +12:00
Aldo Cortesi
4ed5043c67 Add coding style check, reformat. 2015-05-30 12:03:13 +12:00
Aldo Cortesi
f927701e74 Websocket frame read limit. 2015-04-30 08:03:26 +12:00
Aldo Cortesi
5405a4d458 Pull HTTP functionality out of language._Message in prep for frames 2015-04-24 07:35:17 +12:00
Aldo Cortesi
b0ab5297d1 Change the semantics of the craft anchor point specification
The anchor point is now defined as /p (rather than /p/), with the specification
for a request just to /p or /p/ being empty.
2015-04-23 17:35:22 +12:00
Aldo Cortesi
dacb350040 pathod: register websocket key from client handshake 2015-04-23 17:11:20 +12:00
Aldo Cortesi
99cb0808ab websockets: server handshake scheme
Also refactor settings and resolution interfaces
2015-04-22 15:49:17 +12:00
Aldo Cortesi
be450cf9db Whitespace, small fixes. 2015-04-20 08:56:47 +12:00
Aldo Cortesi
f332674ce1 100% unit tests
- Add SANs to pathod SSLConfig
- Fix tricky SSL establishment error test. Lets see if it's platform portable.
2015-04-19 10:43:16 +12:00
Aldo Cortesi
d8b79e9982 Scripts to reproducibly generate the test certificate 2015-04-19 10:12:15 +12:00
Aldo Cortesi
ef8e02edc3 Fix test that fails on Travis with a bodge
Circumvents a platform difference causing a test failure.
2015-04-17 18:02:03 +12:00
Aldo Cortesi
fe8e27f27b Housekeeping: .env and fix unit tests 2015-04-17 15:27:50 +12:00
Aldo Cortesi
27c7e9e934 Fix unit tests 2014-11-11 13:34:02 +13:00
Aldo Cortesi
00d0ee5ad5 Parse patterns eagerly on instantiation 2014-10-25 15:30:54 +13:00
Aldo Cortesi
962a414327 Fix tests, re-add scripts 2014-10-24 14:01:34 +13:00
Aldo Cortesi
ca97aed4b8 Adjust timeout test to make race condition much less likely. 2014-03-10 17:19:46 +13:00
Aldo Cortesi
e54bf1a804 Adjust for upstream cert store changes, improve cert handling significantly 2014-03-05 15:03:31 +13:00
Aldo Cortesi
944f213ebc Add connection cipher info to pathod server log 2014-03-02 22:10:49 +13:00
Aldo Cortesi
0177eb899a Support cert/key combo files in args. Improve argument names in SSLOptions 2014-03-02 15:56:36 +13:00
Aldo Cortesi
234d326080 Implement custom certs. 2014-03-02 15:13:56 +13:00
Aldo Cortesi
091e539a02 Big improvements to SSL handling
- pathod now dynamically generates SSL certs, using the ~/.mitmproxy
cacert
- pathoc returns data on SSL peer certificates
- Pathod certificate CN can be specified on command line
- Support SSLv23
2014-03-02 13:45:35 +13:00
Maximilian Hils
b994fb5a27 adjust to signature changes in netlib.tcp 2014-01-28 19:28:20 +01:00
Aldo Cortesi
9167b9b8b6 Make pathoc request return more human-friendly. 2013-02-27 09:07:16 +13:00
Aldo Cortesi
69339836c2 Adapt to netlib API changes. 2013-02-24 15:36:35 +13:00
Aldo Cortesi
9c9e15341f Make last_log return None if nothing is logged. 2013-02-23 21:46:01 +13:00
Aldo Cortesi
ed7ef84557 Implement and unit test not-after-connect option. 2013-01-05 20:36:06 +13:00
Aldo Cortesi
5493925ea0 CONNECT through proxy mode for pathoc
Also, use this to unit test the pathod CONNECT implementation.
2013-01-05 20:29:46 +13:00
Aldo Cortesi
c744ef2dcb Proxy mode: drop to SSL if we see an HTTP CONNECT request 2013-01-05 17:15:42 +13:00
Aldo Cortesi
781592d6c0 Fix timeout test. 2012-11-18 09:34:15 +13:00
Aldo Cortesi
e40482576c Add disconnect specifiers to test suite.
Fixes hangs seen in test suite with recent versions of requetss.
2012-11-18 09:04:49 +13:00
Aldo Cortesi
ef9cbe3b25 Add u User-agent shortcut.
Usage:
    200:ua       - Shortcut "a" for Android.
    200:u"foo"   - Or a value literal

Shortcuts can be listed using the --show-uas argument to pathoc.
2012-11-16 13:46:42 +13:00
Aldo Cortesi
61f8992fbf Change response spec format to code[:features]
Reason message is now specified as just another feature with the "m" mnemonic.
2012-10-28 22:18:06 +13:00
Aldo Cortesi
07560ffe30 Cleaup, ABC for Value classes. 2012-10-28 22:00:19 +13:00
Aldo Cortesi
9d42a06c92 Move message body to new lazy-generator scheme. 2012-10-28 12:56:08 +13:00
Aldo Cortesi
ac5aacce44 Remove check argument to serve() methods.
Refactoring means we can now do this without a callback.

Also introduce the maximum_length method that estimates the max possible
message length.
2012-10-27 17:40:22 +13:00
Aldo Cortesi
6174e46023 Unit test suite love: 100% coverage
Also start figuring out how to sanitize binary data in the JSON API.
2012-10-25 10:59:18 +13:00
Aldo Cortesi
915bcfbd30 Add timeout argument to Pathod, and matching -t command-line option. 2012-10-01 12:01:02 +13:00
Aldo Cortesi
e52a37ffa9 Cleanup of libpathod.test, test example for front page. 2012-07-30 17:29:36 +12:00
Aldo Cortesi
e26aac1d3c 100% test coverage. 2012-07-30 13:52:40 +12:00
Aldo Cortesi
3e158211a8 Add a --nohang flag that turns off pauses in response generation. 2012-07-26 20:01:51 +12:00
Aldo Cortesi
8cfbc2f80e Refactor test.py, add unit tests for app.py corner case. 2012-07-25 10:34:57 +12:00
Aldo Cortesi
622a2b5607 Add a --noweb option to turn web iface off, refactor unit tests. 2012-07-23 19:55:33 +12:00
Aldo Cortesi
763e1ff786 pathod.py unit tests++ 2012-07-23 17:53:17 +12:00
Aldo Cortesi
773ada882d Unit tests for most of app.py, return 404 for unknown log entry. 2012-07-23 16:18:47 +12:00
Aldo Cortesi
1c45f5b05c Use policy hook to apply a size limit in pathod, add corresponding cmdline arg. 2012-07-23 15:03:56 +12:00
Aldo Cortesi
1b03fd6780 Allow execution of specs from file, using +./path 2012-07-22 23:37:46 +12:00
Aldo Cortesi
1e93e42883 Escape special characters in first line error log. 2012-07-22 12:40:27 +12:00