Opened 6 years ago

Closed 18 months ago

#11977 closed defect (wontfix)

Modified TrueHeaders class to order headers

Reported by: cypherpunks Owned by: hellais
Priority: Medium Milestone:
Component: Archived/Ooni Version:
Severity: Normal Keywords: archived-closed-2018-07-04
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

This issue was automatically migrated from github issue https://github.com/TheTorProject/ooni-probe/issues/298.

Fixes [Issue 254](https://github.com/TheTorProject/ooni-probe/issues/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.

Child Tickets

Change History (2)

comment:1 Changed 2 years ago by teor

Severity: Normal

Set all open tickets without a severity to "Normal"

comment:2 Changed 18 months ago by teor

Keywords: archived-closed-2018-07-04 added
Resolution: wontfix
Status: newclosed

Close all tickets in archived components

Note: See TracTickets for help on using tickets.