Commit ad937183 authored by Kathleen Brade's avatar Kathleen Brade
Browse files

Bug 21627: Ignore HTTP 304 responses when checking redirects.

Avoid noise on the error console when a page is reloaded. Since 304
responses do not have Location headers, it is safe to ignore such
responses inside our http-on-examine-response observer.
parent 2e301c0a
......@@ -128,9 +128,9 @@ var requestObserver = {
// If this is a redirect...
//
// Note: Technically `304 Not Modifed` isn't a redirect, but receiving that
// to the proscribed schemes is nonsensical.
if (aStatus >= 300 && aStatus < 400) {
// Note: `304 Not Modifed` isn't a redirect, so there is no Location header to check
// in that case.
if (aStatus >= 300 && aStatus < 400 && aStatus != 304) {
let location = aChannel.getResponseHeader("Location");
let aUri = this.ioService.newURI(location, null, null);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment