Bug 217296 - Make xhr.response more conforming to the specification
Summary: Make xhr.response more conforming to the specification
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Rob Buis
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-04 09:16 PDT by Rob Buis
Modified: 2020-10-05 03:31 PDT (History)
3 users (show)

See Also:


Attachments
Patch (18.02 KB, patch)
2020-10-04 09:26 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (19.50 KB, patch)
2020-10-04 11:21 PDT, Rob Buis
no flags Details | Formatted Diff | Diff
Patch (19.53 KB, patch)
2020-10-05 01:56 PDT, Rob Buis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Buis 2020-10-04 09:16:50 PDT
Make xhr.response more conforming to the specification when dealing
with Blob type responses, the type for the Blob should be computed
by the "get a final MIME type" algorithm [1, 2].

[1] https://xhr.spec.whatwg.org/#ref-for-final-mime-type③
[2] https://xhr.spec.whatwg.org/#final-mime-type
Comment 1 Rob Buis 2020-10-04 09:26:51 PDT
Created attachment 410469 [details]
Patch
Comment 2 Rob Buis 2020-10-04 11:21:57 PDT
Created attachment 410473 [details]
Patch
Comment 3 Darin Adler 2020-10-04 14:27:38 PDT
Comment on attachment 410473 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=410473&action=review

> Source/WebCore/xml/XMLHttpRequest.h:94
> +    enum class FinalMIMEType { Yes, No };
> +    String responseMIMEType(FinalMIMEType = FinalMIMEType::No) const;

What does "final MIME type" mean?
Comment 4 Darin Adler 2020-10-04 14:28:03 PDT
Comment on attachment 410473 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=410473&action=review

>> Source/WebCore/xml/XMLHttpRequest.h:94
>> +    String responseMIMEType(FinalMIMEType = FinalMIMEType::No) const;
> 
> What does "final MIME type" mean?

I guess it’s a term from the specification?
Comment 5 Rob Buis 2020-10-05 01:56:37 PDT
Created attachment 410510 [details]
Patch
Comment 6 Rob Buis 2020-10-05 03:16:48 PDT
(In reply to Darin Adler from comment #4)
> Comment on attachment 410473 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=410473&action=review
> 
> >> Source/WebCore/xml/XMLHttpRequest.h:94
> >> +    String responseMIMEType(FinalMIMEType = FinalMIMEType::No) const;
> > 
> > What does "final MIME type" mean?
> 
> I guess it’s a term from the specification?

Yes, it should be explained in the ChangeLog/Changelog links.
Comment 7 EWS 2020-10-05 03:30:38 PDT
Committed r267959: <https://trac.webkit.org/changeset/267959>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 410510 [details].
Comment 8 Radar WebKit Bug Importer 2020-10-05 03:31:21 PDT
<rdar://problem/69948052>