mitmproxy/netlib
Pedro Worcel e7c3e4c5ac Change error into awesome user-friendlyness
Hi there,

I was getting a very weird error "ODict valuelist should be lists", when attempting to add a header.

My code was as followed:

```
        msg.headers["API-Key"] = new_headers["API-Key"]                                                                                                                                                                              
 42         msg.headers["API-Sign"] = new_headers["API-Sign"]
```

In the end, that was because there could be multiple equal headers. In order to cater to that, it you guys might enjoy the patch I attach, for it converts strings automatically into lists of multiple headers.

I think it should work, but I haven't tested it :$

It'd allow me to have the above code, instead of this one below:

```
        msg.headers["API-Key"] = [new_headers["API-Key"]]                                                                                                                                                                               
 42         msg.headers["API-Sign"] = [new_headers["API-Sign"]]
```
2014-03-30 20:58:47 +13:00
..
contrib Integrate HTTP auth, test to 100% 2013-03-03 10:37:28 +13:00
__init__.py Initial checkin. 2012-06-19 09:42:32 +12:00
certffi.py Certificate flags 2014-03-10 17:29:27 +13:00
certutils.py create dhparam file if it doesn't exist, fix mitmproxy/mitmproxy#235 2014-03-11 20:23:27 +01:00
http_auth.py allow super() on TCPServer, add thread names for better debugging 2014-02-15 23:16:28 +01:00
http_status.py Add http_status.py 2012-06-23 18:34:51 +12:00
http_uastrings.py Add a collection of standard User-Agent strings. 2012-09-01 23:04:44 +12:00
http.py add CONNECT request to list of request types that don't have a response body 2014-01-18 22:55:40 +01:00
odict.py Change error into awesome user-friendlyness 2014-03-30 20:58:47 +13:00
tcp.py fix #28 2014-03-10 17:43:39 +01:00
test.py Support Ephemeral Diffie-Hellman 2014-03-07 16:38:50 +13:00
utils.py Tighten up checks on port ranges and path character sets. 2013-03-03 21:39:15 +13:00
version.py Bump version 2014-02-11 12:09:58 +01:00
wsgi.py adjust netlib.wsgi to reflect changes in mitmproxys flow format 2014-02-05 21:34:14 +01:00