Closed Bug 2032997 Opened 3 months ago Closed 3 months ago

HTTP error code missing on new error page for contentEncodingError

Categories

(Firefox :: Security, defect, P2)

defect

Tracking

()

RESOLVED FIXED
152 Branch
Tracking Status
firefox152 --- fixed

People

(Reporter: manuel, Assigned: mathew.hodson)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Attached image content-encoding.png

Moving Bug 2027209 comment 9 into own bug:

Like HTTP error that were updated in Bug 2023800, the error contentEncodingError happens after establishing the connection to the server. It is also somewhat later due to being an error about the HTTP body, not HTTP headers. We should both:

  1. Show the HTTP status code if it is an error (similar to Bug 2023800) and
  2. Replace the phrase "can’t connect to the server at" with something that describes the situation more correctly.

I'm attach a screenshot of how it looks like now/before. Sorry, I'm unable to share the website, because it is a private one. And I haven't found a good test website / haven't setup one yet.

I see that (2) is currently getting addressed in Bug 2027209.

Opening a separate for (1) as per Bug 2027209 comment 10.

Severity: -- → S3
Priority: -- → P2
Assignee: nobody → mathew.hodson
Status: NEW → ASSIGNED

@jbrown, should the HTTP response error code be added to the "invalidHeaderValue" page as well?

Flags: needinfo?(jbrown)

Seems like this was already addressed in Bug 2027209 patch D295031.

https://github.com/mozilla-firefox/firefox/commit/8a540e7c99aa
https://hg.mozilla.org/mozilla-central/rev/267da15baa9d

Thanks @Mathew for taking the time to write the patch, sorry that it was now fixed in another bug.

Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Depends on: 2027209
Flags: needinfo?(jbrown)
Resolution: --- → FIXED
See Also: 2027209
Target Milestone: --- → 151 Branch

The new content encoding page now looks like this (latest Nightly):

Content Encoding Error

The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.

What can you do about it?

The issue is most likely with the website, and there is nothing you can do to resolve it. You can notify the website’s administrator about the problem.

Assignee: mathew.hodson → jbrown

(In reply to Manuel Bucher [:manuel] from comment #3)

Seems like this was already addressed in Bug 2027209 patch D295031.

Wasn't this bug filed for (1) "Show the HTTP status code if it is an error (similar to Bug 2023800)"
Only (2) was fixed in the other bug. The HTTP response status that was shown on the old page like "Error code: 500 Internal Server Error" isn't on the new page, which is what my patch adds.

Flags: needinfo?(manuel)

Ah thats true. Sorry! My mistake.

Assignee: jbrown → mathew.hodson
Status: RESOLVED → REOPENED
Flags: needinfo?(manuel)
Resolution: FIXED → ---
Target Milestone: 151 Branch → ---
No longer depends on: 2027209
See Also: → 2027209

Re-adding needinfo for @jbrown

(In reply to Mathew Hodson from comment #2)

@jbrown, should the HTTP response error code be added to the "invalidHeaderValue" page as well?

Flags: needinfo?(jbrown)

Ideally it would be nice to add the HTTP response error code to the invalidHeaderValue page, but from playing around with it a bit it seems like it's not as simple as adding showResponseStatus: true to the error config in this case. This particular error looks like it fires during header parsing, and I think that means we don't have access to the response status.

In nsHttpChannel::OnStartRequest around line 9035 mResponseHead is only taken from the transaction if NS_SUCCEEDED(mStatus) is true, mResponseHead being the parsed HTTP response headers (including the status code) and NS_SUCCEEDED(mStatus) being a check that the channel hasn't already encountered an error.

Maybe this should be addressed in a follow-up bug?

Flags: needinfo?(jbrown)
Summary: Http error code missing on new certificate error page for errors that happen after receiving http headers such as contentEncodingError → HTTP error code missing on new error page for contentEncodingError
Status: REOPENED → RESOLVED
Closed: 3 months ago3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch
QA Whiteboard: [qa-triage-done-c153/b152]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: