<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>19796</bug_id>
          
          <creation_ts>2012-10-31 18:47:49 +0000</creation_ts>
          <short_desc>Clarify language related to algorithm parameters</short_desc>
          <delta_ts>2012-11-08 19:47:08 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>MIME</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ian &apos;Hixie&apos; Hickson">ian</reporter>
          <assigned_to name="Gordon P. Hemsley">gphemsley</assigned_to>
          <cc>annevk</cc>
    
    <cc>ian</cc>
    
    <cc>mike</cc>
          
          <qa_contact>sideshowbarker+mimespec</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>77534</commentid>
    <comment_count>0</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-10-31 18:47:49 +0000</bug_when>
    <thetext>&quot;The following flags are used in the media type sniffing algorithm and must be unset by default [...] User agents may explicitly set one or more of these flags when calling the media type sniffing algorithm&quot; is meaningless. The must is completely overridden by the may, and the result is that there are no conformance criteria: browsers can do what they like.

That doesn&apos;t make any sense.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77546</commentid>
    <comment_count>1</comment_count>
    <who name="Gordon P. Hemsley">gphemsley</who>
    <bug_when>2012-10-31 19:37:32 +0000</bug_when>
    <thetext>So, the algorithm has a set of flags (parameters) that can be mentioned (or not) when the algorithm is called. If they are mentioned, they can be set or unset. However, if they are not mentioned, they are unset by default.

How should I rephrase to get that meaning across?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77592</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2012-10-31 22:18:49 +0000</bug_when>
    <thetext>Well first of all I don&apos;t recommend that approach in this case since as far as I can tell, none of the callers need that much flexibility.

But.

If you&apos;d want to do it that way, just say something like:

&quot;When a user agent is to run the foo algorithm, it must run the following steps. These steps can be invoked with a bar flag, a baz flag, and/or a quux flag.&quot; Or some such.

In your current text, &quot;User agents may&quot; is a conformance criteria that isn&apos;t (presumably) what you mean (user agents aren&apos;t allowed to do that unless the specs say they are required to do that), and &quot;must be unset by default&quot; doesn&apos;t really mean anything (how would you test if they are unset by default or explicitly or anything else?).

Check out some of the algorithms in the HTML spec for more inspiration (though note that they&apos;re not all well done; feel free to file bugs on ambiguous ones).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78075</commentid>
    <comment_count>3</comment_count>
    <who name="Gordon P. Hemsley">gphemsley</who>
    <bug_when>2012-11-08 19:47:00 +0000</bug_when>
    <thetext>Fixed:

https://github.com/whatwg/mimesniff/commit/082f1ee67d1952d63334f4b855fb420c454ec205

Note: As a part of this change, I introduced the concept of a &quot;configurable flag&quot;. I didn&apos;t check to see if this concept is defined elsewhere, but I do think it would be an appropriate inclusion in the future spec that defines common terminology.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>