Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #21627

Closed (moved)
Open
Opened Mar 03, 2017 by Mark Smith@mcs

HTTP 304 responses not handled correctly

This is a spinoff from #21396 (moved). While testing gk's fix for that bug, Kathy and I noticed messages like the following on the error console:

15:09:57.836 NS_ERROR_NOT_AVAILABLE: Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIHttpChannel.getResponseHeader]1 content-policy.js:99:0

It turns out that this is caused by responses that have an HTTP status code of 304 ("Not Modified"); we saw them consistently when we reloaded the browserleaks.com page (which makes sense, since the browser sends conditional GET requests in that situation). These kinds of responses do not have a Location header.

We should modify the Torbutton code in src/components/content-policy.js to add a try/catch around the call to getResponseHeader() and not log anything if the response's status code is 304 (we probably want to log something in all other cases).

This is not urgent since it is not a new problem, but it would be good to fix it soon.

To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#21627