Commit Graph

168 Commits

Author SHA1 Message Date
Shadab Zafar
a0932af55c Remove pages object
The HAR Spec says that the field can be left out by applications that don't
group by pages.

http://www.softwareishard.com/blog/har-12-spec/#log
2016-08-15 12:00:23 +05:30
Shadab Zafar
250e4a17d0 Welcome har_dump 2016-08-15 12:00:23 +05:30
Shadab Zafar
8ba34be7ab Goodbye har_extractor 2016-08-15 12:00:23 +05:30
Maximilian Hils
fb238ad63e make the linter happy 2016-07-23 14:35:04 -07:00
Maximilian Hils
b78fea3784 add remote debug example 2016-07-23 14:02:54 -07:00
Aldo Cortesi
afda175e1c Addon iface: .configure(options) -> .configure(options, updated) 2016-07-23 15:43:55 +12:00
Aldo Cortesi
dbafe9f87b scripts: refactor some examples that keep global state
We now have a better way to do this.
2016-07-23 12:24:09 +12:00
Maximilian Hils
3602fd7a36 Merge remote-tracking branch 'origin/master' into message-body-encoding 2016-07-15 23:17:57 -07:00
Aldo Cortesi
917d51bd22 Fix HAR extractor
Thanks to @mhils
2016-07-15 15:01:35 +12:00
Aldo Cortesi
92a5076bd0 Adjust concurrent tests for start method 2016-07-15 15:00:37 +12:00
Aldo Cortesi
4ba7ce50c6 Add .start for addons and scripts
Also improve error messages, fix various unit tests
2016-07-15 14:52:34 +12:00
Aldo Cortesi
b94f5fd361 Convert examples and example tests for new-style scripts
Remove the test that just loads all the example scripts for now - it's a very
low-value test, and we need to think of something better.
2016-07-14 19:54:15 +12:00
Maximilian Hils
5d2b7c52f9 move script context to mitmproxy.ctx 2016-07-08 19:57:57 -07:00
Maximilian Hils
7c67faa8da remove script contexts 2016-07-07 23:50:55 -07:00
Maximilian Hils
c048ae1d5b remove context from all scripts 2016-07-07 20:14:52 -07:00
Maximilian Hils
76473d44e0 py3++ 2016-07-07 17:50:26 -07:00
Maximilian Hils
f259b9478f disable harparser on py3 2016-07-07 01:21:15 -07:00
Maximilian Hils
444f0a4c39 py3++ 2016-07-06 17:31:08 -07:00
Maximilian Hils
d51cf543bb remove clean_bin, clarify unicode handling 2016-07-05 15:11:32 -07:00
Maximilian Hils
dbf7cb1a44 update examples: no decoded() anymore 🎉 2016-07-02 02:01:46 -07:00
Tai Dickerson
c2d0910e59 Make har_extractor.py output HAR 1.2 spec-compliant
HAR files were failing to load in harviewer (http://www.softwareishard.com/har/viewer/) due to:
- ISO 8601 dates for startedDateTime missing timezone (http://www.softwareishard.com/blog/har-12-spec/#pages)
-- Used UTC but could add detection of default system timezone if desired
- pages object missing pageTimings (http://www.softwareishard.com/blog/har-12-spec/#pageTimings)
-- Used {} because all child fields are optional
2016-06-14 12:47:10 -04:00
Maximilian Hils
63c6660895 update examples, tests, docs 2016-06-13 18:17:09 -07:00
Aldo Cortesi
b3bf754e53 Simplify script concurrency helpers
We now have take() to prevent double-replies.
2016-06-08 11:21:38 +12:00
Aldo Cortesi
a388ddfd78 A new interface for reply
Reply is now explicit - it's no longer a callable itself. Instead, we have:

    reply.kill()            - kill the flow
    reply.ack()             - ack, but don't send anything
    reply.send(message)     - send a response

This is part of an incremental move to detach reply from our flow objects,
and unify the script and handler interfaces.
2016-06-08 10:44:20 +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
Maximilian Hils
2e633af5aa handle_* -> * leftovers 2016-05-29 13:01:45 -07:00
Thomas Kriechbaumer
8eeab37a07 more style cleanup
Use this to check:
flake8 --count mitmproxy netlib pathod examples test
2016-05-29 11:55:12 +02:00
Thomas Kriechbaumer
0c2c017727 change comment indentation 2016-05-29 11:04:55 +02:00
Thomas Kriechbaumer
c707479bcd Merge pull request #1173 from mitmproxy/format-examples
Format examples
2016-05-29 11:03:54 +02:00
Aldo Cortesi
27fff86cf7 Update method names in /examples/flowbasic
Please enter the commit message for your changes. Lines starting
2016-05-29 20:51:30 +12:00
Maximilian Hils
17382b963e format examples 2016-05-29 01:23:39 -07:00
Aldo Cortesi
0176f50e4f Adapt examples 2016-05-29 12:54:52 +12:00
Maximilian Hils
6f8db2d7eb improve MultiDict, add ImmutableMultiDict, adjust response.cookies 2016-05-18 22:50:19 -07:00
Maximilian Hils
44ac64aa72 add MultiDict
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.
2016-05-18 18:46:42 -07:00
Jason Pepas
b174fd5e1f Adding example which turns every reponse into an HTTP 500. (#1136)
* Adding example which turns every reponse into an HTTP 500.

* Prefer b"" over None for response.content.
2016-05-11 15:26:17 -06:00
Maximilian Hils
909d5ec87e FlowReadError -> FlowReadException 2016-04-29 11:17:49 -07:00
Maximilian Hils
bc60c26c7b py3++ 2016-04-13 22:34:28 -07:00
Maximilian Hils
35a6d6e7f6 response.msg -> response.reason 2016-04-02 22:54:46 +02:00
Maximilian Hils
6f902ffbb3 py3++: iteritems 2016-03-20 19:56:22 +01:00
Maximilian Hils
88d365cfe6 py3++: cStringIO 2016-03-20 19:40:03 +01:00
cle1000
0a478e4e39 Update modify_response_body.py
fix typo
2016-03-15 15:36:10 +01:00
Shadab Zafar
7c5791e51a Use the contextmanager in all tests 2016-03-11 17:57:57 +05:30
Shadab Zafar
2cd5392657 Add test for iframe_injector example 2016-03-11 17:57:57 +05:30
Shadab Zafar
9ef1522b5f Update modify_querystring example & add test for it 2016-03-11 17:57:57 +05:30
Shadab Zafar
106b296871 Update modify_form example to not use deprecated functions 2016-03-11 17:57:57 +05:30
Maximilian Hils
167bd77683 fix content view example inline script 2016-03-10 21:17:05 +01:00
Shadab Zafar
7108d72705 Fix pprint import 2016-03-04 03:02:49 +05:30
Shadab Zafar
1c80599379 Use default empty page_list 2016-03-04 03:02:33 +05:30
Shadab Zafar
c982f579dd Add basic test for har_extractor 2016-03-04 02:32:01 +05:30