Commit Graph

23 Commits

Author SHA1 Message Date
Aldo Cortesi
4eb2b56dec Let's not over-ride __bool__ on connection objects
If I had a thousand years and every thesaurus in the world, I still couldn't
adequately express how much I dislike this piece of interface design.
2016-11-04 10:59:41 +13:00
Slobodan Mišković
39d7ba852c Include boudary=... in mutipart postData
While the HAR spec is not very explicit and their example shows just this one example: ```json
"postData": {
    "mimeType": "multipart/form-data"
}
```
Would it not make sense to include all the information necessary to parse out the post data `text`. Eg.
```json
"postData": {
           "text": "--xYzZY\r\nContent-Disposition: form-data; name=\"sort1\"\r\n\r\noldest date first\r\n--xYzZY--\r\n",
           "mimeType": "multipart/form-data; boundary=xYzZY"
         },
```
Currently, full mimeType is included only in `content-type` request header.

Elsewhere in HAR spec they include the 'extras', eg ```json
"content": {
    "mimeType": "text/html; charset=utf-8"
}
``` 
So one could argue that `mimeType` should include all information necessary to interpret the data. In case of `multipart/form-data`, as per RFC2046 http://www.ietf.org/rfc/rfc2046.txt
```
 The Content-Type field for multipart entities requires one parameter, "boundary".
```
I believe that earlier incarnations, eg `har_exporter.py` included it in the mimeType.
2016-10-24 14:34:04 -07:00
Maximilian Hils
a1a792aeac various encoding fixes, fix #1650 2016-10-22 18:47:12 -07:00
Slobodan Mišković
0526d94f4a Handle bytes in request parameters 2016-10-22 18:28:32 -07:00
Aldo Cortesi
8430f857b5 The final piece: netlib -> mitproxy.net 2016-10-20 11:56:38 +13:00
Aldo Cortesi
f45f4e677e netlib.strutils -> mitmproxy.utils.strutils 2016-10-20 10:11:58 +13:00
Aldo Cortesi
7440232f60 netlib.version -> mitmproxy.version 2016-10-20 09:20:44 +13:00
Shadab Zafar
bf4425de80 Fix issue with binary content in json 2016-08-15 12:00:23 +05:30
Shadab Zafar
4f1fb43dcc Use postData field in PUT, PATCH requests too
The HAR spec isn't really clear on whether this should be the case,
but Google Chrome does this, so I think we should too.
2016-08-15 12:00:23 +05:30
Shadab Zafar
15c488225f Refactor format_cookies 2016-08-15 12:00:23 +05:30
Shadab Zafar
567cbe6cb9 Support .zhar compression 2016-08-15 12:00:23 +05:30
Shadab Zafar
ac97e5efa1 Add text field to response content 2016-08-15 12:00:23 +05:30
Shadab Zafar
9aa230707d Add serverIPAddress field 2016-08-15 12:00:23 +05:30
Shadab Zafar
7de48fc197 Add postData field 2016-08-15 12:00:23 +05:30
Shadab Zafar
b14eb57db1 Add SSL & Connect timings 2016-08-15 12:00:23 +05:30
Shadab Zafar
23b9ef799e Add a ctx.log on finish 2016-08-15 12:00:23 +05:30
Shadab Zafar
456f80d862 Open JSON file in text mode 2016-08-15 12:00:23 +05:30
Shadab Zafar
2c9240fd22 Simplify name_value 2016-08-15 12:00:23 +05:30
Shadab Zafar
e9c6563367 Fix wrong import 2016-08-15 12:00:23 +05:30
Shadab Zafar
a2a8283fa4 Improve cookies formatting 2016-08-15 12:00:23 +05:30
Shadab Zafar
55f1ffe0b1 Format Cookies according to the HAR Spec 2016-08-15 12:00:23 +05:30
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