Issue 138 in dpkt: [patch] Made http.py return ordered headers

2 views
Skip to first unread message

dp...@googlecode.com

unread,
Mar 28, 2015, 4:11:38 PM3/28/15
to dp...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 138 by alex...@gmail.com: [patch] Made http.py return ordered
headers
https://code.google.com/p/dpkt/issues/detail?id=138

Not a bug, just an improvement.

HTTP headers are returned unordered (they are held in a simple dict).
Simple patch to make headers be returned in the same order as they are in
the request.

This is helpful for the very particular use case to fingerprint certain
browsers.

This does have some drawbacks, since OrderedDicts are python 2.7 and above
only. Backwards compatibility can be achieved using ordereddict, but it
introduces an extra dependency.

Attachments:
ordered_http_headers.patch 2.7 KB

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
Reply all
Reply to author
Forward
0 new messages