Closed Bug 1169613 Opened 9 years ago Closed 9 years ago

Use content type of synthesized response for JAR channel requests if available

Categories

(Core :: DOM: Service Workers, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
NGA S2 (12Jun)
Tracking Status
firefox41 --- fixed

People

(Reporter: ferjm, Assigned: ferjm)

References

Details

(Whiteboard: [s3])

Attachments

(3 files, 1 obsolete file)

We are currently inferring the content type from the URL of the request, but that should not necessarily be the same as the on specified in the synthesized response.
Assignee: nobody → ferjmoreno
Whiteboard: [s3]
Attached patch v1 (obsolete) — Splinter Review
Working on tests now
Attachment #8613457 - Flags: review?(josh)
Comment on attachment 8613457 [details] [diff] [review] v1 Review of attachment 8613457 [details] [diff] [review]: ----------------------------------------------------------------- This should have a test, too. I think we can perform an XHR to an ".txt" app url that is intercepted and set the responseType to "document", then sythesize a text/html response and check that xhr.response is a Document object once the request is complete. ::: modules/libjar/nsJARChannel.cpp @@ +896,5 @@ > } > > void > +nsJARChannel::OverrideWithSynthesizedResponse(nsIInputStream* aSynthesizedInput, > + nsCString aContentType) const nsACString& @@ +917,5 @@ > aSynthesizedInput->Close(); > return; > } > > + mContentType = aContentType; Call SetContentType instead.
Attachment #8613457 - Flags: review?(josh) → review+
r=jdm from comment 2
Attachment #8613457 - Attachment is obsolete: true
Attachment #8613952 - Flags: review+
Attached patch Part 3: TestsSplinter Review
Attachment #8613954 - Flags: review?(josh)
Target Milestone: --- → NGA S2 (12Jun)
Attachment #8613954 - Flags: review?(josh) → review+
Status: NEW → ASSIGNED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: