[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #25960 [Core Tor/Tor]: Allow additional header lines in bandwidth measurements documents
#25960: Allow additional header lines in bandwidth measurements documents
-------------------------------------------------+-------------------------
Reporter: juga | Owner: juga
Type: enhancement | Status:
| needs_review
Priority: Medium | Milestone: Tor:
| 0.3.4.x-final
Component: Core Tor/Tor | Version:
Severity: Normal | Resolution:
Keywords: bwauth, 029-backport, 031-backport, | Actual Points:
032-backport, 033-backport |
Parent ID: #25925 | Points:
Reviewer: | Sponsor:
-------------------------------------------------+-------------------------
Comment (by teor):
Thanks, I left some comments on
https://github.com/juga0/tor/tree/bug25960_maint-0.2.9_additional_headers
1. A note about strict versus lax parsing. We don't need to change any
code.
2. Please add unit tests where header lines fail to parse.
It would also be great if we had tests for entire version 1.0.0 and
version 1.1.0 files, so we know we haven't broken parsing.
Here's one way to code these tests, if the existing function takes a
filename:
1. Mock read_file_to_string to return the test data
Here's another way:
1. Refactor the existing tor code so it reads the file to a string in one
function A, then passes the string to another function B
2. Call function B with the test data
Let me know if you need help with this code.
Please add extra commits for each change, and don't squash until we're
ready to merge,
(When we squash, we keep commits that do different things separate.)
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25960#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs