Skip to content
Snippets Groups Projects
Closed Modified TrueHeaders class to order headers
  • View options
  • Modified TrueHeaders class to order headers

  • View options
  • Closed Issue created by cypherpunks

    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.

    Linked items ... 0

  • Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first
    Loading Loading Loading Loading Loading Loading Loading Loading Loading Loading