aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/tcp.py
diff options
context:
space:
mode:
authorPedro Worcel <pedro@worcel.com>2014-03-30 20:58:47 +1300
committerPedro Worcel <pedro@worcel.com>2014-03-30 20:58:47 +1300
commite7c3e4c5acdf9a229e13502e14a39caac332fe6c (patch)
tree65ed33cf2f9250886a87117c5f48be9345858572 /netlib/tcp.py
parenta3107474f9f336f28dc195f1406a4e035aa51c84 (diff)
downloadmitmproxy-e7c3e4c5acdf9a229e13502e14a39caac332fe6c.tar.gz
mitmproxy-e7c3e4c5acdf9a229e13502e14a39caac332fe6c.tar.bz2
mitmproxy-e7c3e4c5acdf9a229e13502e14a39caac332fe6c.zip
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"]] ```
Diffstat (limited to 'netlib/tcp.py')
0 files changed, 0 insertions, 0 deletions