This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 19937 - "Determining the supplied media type" should return "has-content-type" rather than using a global
Summary: "Determining the supplied media type" should return "has-content-type" rather...
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: MIME (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Gordon P. Hemsley
QA Contact: sideshowbarker+mimespec
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-11 18:36 UTC by Ian 'Hixie' Hickson
Modified: 2012-11-16 22:08 UTC (History)
1 user (show)

See Also:


Attachments

Description Ian 'Hixie' Hickson 2012-11-11 18:36:29 UTC
# [19:28] <Hixie> GPHemsley: what has the "has content type" flag? is it a system-global flag?  
# [19:29] <GPHemsley> Hixie: If I understand what you're asking, yes.  
# [19:30] <GPHemsley> Hixie: It is set in the "supplied media type detection algorithm" and checked again in the "media type sniffing algorithm"  
# [19:30] <Hixie> GPHemsley: so if two pages are both going to read a resource's mime type at the same time, they interfere?  
# [19:31] <GPHemsley> Hixie: Oh, it's not that global. This entire spec assumes each resource analysis is self-contained.  
# [19:32] <Hixie> GPHemsley: "assumes" gets us into a lot of trouble :-P  
# [19:32] <GPHemsley> Hixie: Yeah... hadn't considered the possibility  
# [19:32] <Hixie> i recommend just making it a return value  
# [19:32] <Hixie> return a pair (type, had-content-type)  
# [19:32] <Hixie> or some such
Comment 1 Gordon P. Hemsley 2012-11-16 22:04:52 UTC
I opted instead to attach metadata directly to each resource:

http://mimesniff.spec.whatwg.org/#handling-a-resource

Let me know if this doesn't go far enough to assuage your concerns.