Open Bug 1741845 Opened 3 years ago Updated 2 years ago

Status code is 0, all response headers are empty for an XHR (or JQuery ajax) that has HTTP status code 408

Categories

(Core :: DOM: Networking, defect, P2)

Firefox 93
defect

Tracking

()

UNCONFIRMED

People

(Reporter: dimitriks, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36

Steps to reproduce:

  1. Make a POST request.
  2. Get a response with HTTP code 408.
  3. Handle 408 error code in JavaScript.

Actual results:

In JavaScript:
XHR status is 0.
XHR readyState is 0.
All response headers are empty.

Expected results:

In JavaScript:
XHR status should be 408.
XHR readyState should be 4.
All response headers must be available.

In any browser except Firefox the status code is 408.

Attached image 408 (network devtools firefox ).jpg (deleted) —

HTTP code 408 at network devtools firefox

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Networking' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → DOM: Networking
Product: Firefox → Core

I've tried to create a simple test to reproduce this locally, but not succeeded.
Could you provide the website that show this issue to me? Thanks.

Flags: needinfo?(dimitriks)

(In reply to Kershaw Chang [:kershaw] from comment #4)

I've tried to create a simple test to reproduce this locally, but not succeeded.
Could you provide the website that show this issue to me? Thanks.

Just found out that the way Firefox treats 408 response is different in Http/1.1 and Http/2.

Severity: -- → S4
Depends on: 1752270
Flags: needinfo?(dimitriks)
Priority: -- → P2
Whiteboard: [necko-triaged]
Blocks: xhr
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: