Modified TrueHeaders class to order headers
View options
- Truncate descriptions
This issue was automatically migrated from github issue https://github.com/TheTorProject/ooni-probe/issues/298.
Fixes Issue 254 by storing TrueHeaders in an OrderedDict
.
Removes clutter from TrueHeaders class by making _rawHeaders
a simple OrderedDict
mapping from header string to list of value strings. This conforms with its type in the superclass (twisted.web.http_headers.Headers
) and removes the need to override a few methods. A new dict _headerCases
stores the mapping from lowercase header name to their original capitalization. This is accessed by overriding the superclass method Headers._canonicalNameCaps
.
Adds test_trueheaders.test_order_preserved
to ensure getAllRawHeaders
returns headers in the order they were set.
- Show labels
- Show closed items