Closed Bug 1187011 Opened 9 years ago Closed 9 years ago

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

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: bkelly, Assigned: mikokm, Mentored)

References

Details

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

Attachments

(1 file, 1 obsolete file)

Relevant code here is dom/fetch/Response.cpp in the static Constructor method.
I'm working on it
Attachment #8666872 - Flags: review?(bkelly)
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+
Also, can you push a try build?
Assignee: nobody → mikokm
Status: NEW → ASSIGNED
Attachment #8666872 - Attachment is obsolete: true
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)
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+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/1e407fe41dcd
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: