[metrics-bugs] #24823 [Metrics/Website]: Avoid sending an error after a (partial) response (was: Avoid logging an exception when the client aborts a CSV file download)

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Jan 9 21:38:47 UTC 2018


#24823: Avoid sending an error after a (partial) response
-----------------------------+------------------------------
 Reporter:  karsten          |          Owner:  metrics-team
     Type:  defect           |         Status:  needs_review
 Priority:  Low              |      Milestone:
Component:  Metrics/Website  |        Version:
 Severity:  Normal           |     Resolution:
 Keywords:                   |  Actual Points:
Parent ID:                   |         Points:
 Reviewer:                   |        Sponsor:
-----------------------------+------------------------------
Changes (by karsten):

 * status:  needs_revision => needs_review


Comment:

 Replying to [comment:3 iwakeh]:
 > Replying to [comment:2 karsten]:
 > > Hmm, or maybe we should not attempt to send an error code after
 sending a (partial) response to the client. Please review
 [https://gitweb.torproject.org/karsten/metrics-
 web.git/commit/?h=task-24823&id=f310c0dab2a30aa6f7b7a844e4304e6f347168bb
 commit f310c0d in my task-24823 branch]. (Untested!)
 >
 > This is a good idea. Maybe, the ticket title should be changed to 'Avoid
 sending an error after a (partial) response.'?

 Sure!

 > I would want to keep the try-with-resources in method 'writeStatsFile'
 in order to close everything properly;  the exceptions don't need to be
 caught in there.  Setting to needs-revision.

 Ah, good idea. Please find [https://gitweb.torproject.org/karsten/metrics-
 web.git/commit/?h=task-24823&id=535dc67071e702fa60e858a613af3e620daa6039
 commit 535dc67] which puts the try-with-resources back. (Still untested!)

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24823#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the metrics-bugs mailing list