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 20867 - "sniffed media type" is used in confusing manner
Summary: "sniffed media type" is used in confusing manner
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: MIME (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: Unsorted
Assignee: Gordon P. Hemsley
QA Contact: sideshowbarker+mimespec
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 19798
  Show dependency treegraph
 
Reported: 2013-02-04 19:51 UTC by Ian 'Hixie' Hickson
Modified: 2013-02-22 19:42 UTC (History)
1 user (show)

See Also:


Attachments

Description Ian 'Hixie' Hickson 2013-02-04 19:51:31 UTC
http://mimesniff.spec.whatwg.org/#determining-the-sniffed-media-type-of-a-resource

This algorithm is confusing. Section 4 defines "sniffed media type" as the result of invoking an algorithm, but then that algorithm reads that value. It looks like the algorithm really should be reading and writing to a "local variable", and then returning that, or, that the term shouldn't be defined outside that algorithm such that the algorithm should just be called directly by referencing specs.
Comment 1 Gordon P. Hemsley 2013-02-22 19:42:21 UTC
I believe I have fixed this.

https://github.com/whatwg/mimesniff/commit/60f10b24638b728cb73bee9a8b2f08e82359487f