<?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>16292</bug_id>
          
          <creation_ts>2012-03-09 21:59:34 +0000</creation_ts>
          <short_desc>conflation of DOMString and deflated DOMString</short_desc>
          <delta_ts>2012-06-25 07:55:21 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>XHR</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://dvcs.w3.org/hg/xhr/raw-file/8d4e9ccfdbd4/Overview.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Glenn Adams">glenn</reporter>
          <assigned_to name="Anne">annevk</assigned_to>
          <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>65239</commentid>
    <comment_count>0</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-03-09 21:59:34 +0000</bug_when>
    <thetext>In section 4.7.1., step 2 states &quot;let method be the result of deflating method&quot;. This statement is not well defined since method is a DOMString (a 16-bit coding unit sequence) and the results of deflating method is an 8-bit (byte) sequence.

Furthermore, step 3 states &quot;if method is a case-insensitive match for CONNECT, DELETE, GET, HEAD, OPTIONS, POST, PUT, TRACE, or TRACK subtract 0x20 from each byte...&quot;. Here, &quot;method&quot; is obviously being interpreted as a byte sequence (a deflated DOMString) but in contravention of its declared type (DOMString). Moreover, the rule talks about a &quot;case-insensitive match for CONNECT, ...&quot;, but these strings &quot;CONNECT&quot;, etc., are presumably interpreted as DOMStrings, since that is the only string type being used.

The same problem occurs under 4.7.2 steps 2, 3, and 4.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65241</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-03-09 22:04:44 +0000</bug_when>
    <thetext>It uses case-insensitive on bytes in the same manner that HTTP uses case-insensitive on bytes. I&apos;m not really sure there&apos;s a problem here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65244</commentid>
    <comment_count>2</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-03-09 22:21:55 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; It uses case-insensitive on bytes in the same manner that HTTP uses
&gt; case-insensitive on bytes. I&apos;m not really sure there&apos;s a problem here.

the problem is that:

(1) method is defined as a DOMString
(2) step 2 states let method = deflated(method)
(3) but deflated(method) is a 8-bit byte sequence per section 3, not a DOMString

then also:

(4) step 3 says perform case-insensitive-match(deflated(method),&quot;CONNECT&quot;)
(5) but &quot;CONNECT&quot; is a DOMString

as such, the prose is consistently *mixing* operations on two different data types</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65247</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-03-09 22:24:32 +0000</bug_when>
    <thetext>What makes you think &quot;CONNECT&quot; is a DOMString in that sentence?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65248</commentid>
    <comment_count>4</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-03-09 22:27:20 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; What makes you think &quot;CONNECT&quot; is a DOMString in that sentence?

because all string literals in JS are effectively DOMString, and because method is defined as DOMString, and because nothing in the text says ascii(&quot;CONNECT&quot;) or latin1(&quot;CONNECT&quot;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65249</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-03-09 22:27:53 +0000</bug_when>
    <thetext>Anyway, HTTP should not be a model to the follow I guess; it&apos;s quite terrible. Suggestions for how to phrase it instead?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65250</commentid>
    <comment_count>6</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-03-09 22:28:15 +0000</bug_when>
    <thetext>There is nothing that says that is a JavaScript string literal though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65251</commentid>
    <comment_count>7</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-03-09 22:30:57 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; Anyway, HTTP should not be a model to the follow I guess; it&apos;s quite terrible.
&gt; Suggestions for how to phrase it instead?

agreed; yes I can suggest a rephrase, but if you permit me some time, i&apos;ll provide something over the weekend after i finish my review; i may have similar comments for other text, so it would be easier to deal with them all in one go...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65252</commentid>
    <comment_count>8</comment_count>
    <who name="Glenn Adams">glenn</who>
    <bug_when>2012-03-09 22:33:38 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; There is nothing that says that is a JavaScript string literal though.

let&apos;s just agree that the text is ambiguous since it is using a combination both 16-bit (UTF-16) and 8-bit (LATIN1) variables and operations; so in this context, it needs to be clear regarding the use of bare tokens in the text; i will make a proposal to address and then we can word smith to obtain mutual satisfaction (i hope)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69379</commentid>
    <comment_count>9</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-06-25 07:55:21 +0000</bug_when>
    <thetext>Thanks to the new IDL ByteString concept this is now resolved.

http://dvcs.w3.org/hg/xhr/rev/bc6759d87d74</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>