[whatwg] "Official type" used before definition in spec

Aaron Crane what at aaroncrane.co.uk
Mon Apr 13 04:09:44 PDT 2009


The "Web pages" part of the Content-Type sniffing algorithm[1] has a
list of steps beginning:

> 1. If the user agent is configured to strictly obey Content-Type
>    headers for this resource, then jump to the last step in this set
>    of steps.

The last step in that list reads:

> 8. The sniffed type of the resource is *official type*.

However, the variable "official type" is defined in step 3, which
readers have been directed to skip over for the case where the UA is
configured to strictly obey Content-Type headers for this resource.
This strikes me as awkward at best.

I suggest moving the first sentence of step 3 ("Let *official type* be
the type given by the Content-Type metadata for the resource, ignoring
parameters.") to a new first step, and rewording the current step 3
appropriately in the face of that change.

[1] http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#content-type-sniffing:-web-pages

-- 
Aaron Crane ** http://aaroncrane.co.uk/



More information about the whatwg mailing list