Response constructor should throw if body provided, but status code does not permit a body

RESOLVED FIXED in Firefox 44

Status

()

Core
DOM
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: bkelly, Assigned: miko, Mentored)

Tracking

unspecified
mozilla44
Points:
---

Firefox Tracking Flags

(firefox44 fixed)

Details

(Whiteboard: [good first bug][lang=c++])

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

2 years ago
https://github.com/whatwg/fetch/issues/86

Comment 1

2 years ago
Relevant code here is dom/fetch/Response.cpp in the static Constructor method.
I'm working on it
(Assignee)

Comment 3

2 years ago
Created attachment 8666872 [details] [diff] [review]
Dont allow body with null body status
(Assignee)

Updated

2 years ago
Attachment #8666872 - Flags: review?(bkelly)
(Reporter)

Comment 4

2 years ago
Comment on attachment 8666872 [details] [diff] [review]
Dont allow body with null body status

Review of attachment 8666872 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good!  Just one nit to fix.  r=me with that addressed.  Thanks!

::: dom/tests/mochitest/fetch/test_response.js
@@ +201,5 @@
>      });
>    })
>  }
>  
> +function testBug1187011() {

nit: Can you name this function something like testNullBodyStatus() instead of using the bug number?
Attachment #8666872 - Flags: review?(bkelly) → review+
(Reporter)

Comment 5

2 years ago
Also, can you push a try build?
Assignee: nobody → mikokm
Status: NEW → ASSIGNED
(Assignee)

Comment 6

2 years ago
https://treeherder.mozilla.org/#/jobs?repo=try&revision=e384dcebc28b
(Assignee)

Comment 7

2 years ago
Created attachment 8668035 [details] [diff] [review]
Don't allow response body with null body status
(Assignee)

Updated

2 years ago
Attachment #8666872 - Attachment is obsolete: true
(Assignee)

Comment 8

2 years ago
Comment on attachment 8668035 [details] [diff] [review]
Don't allow response body with null body status

Thank you for the review. Here is the change you requested.
Attachment #8668035 - Flags: review?(bkelly)
(Reporter)

Comment 9

2 years ago
Comment on attachment 8668035 [details] [diff] [review]
Don't allow response body with null body status

Review of attachment 8668035 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!
Attachment #8668035 - Flags: review?(bkelly) → review+
(Assignee)

Updated

2 years ago
Keywords: checkin-needed

Comment 10

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/1e407fe41dcd
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/1e407fe41dcd
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-firefox44: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.