<?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>12913</bug_id>
          
          <creation_ts>2011-06-08 17:21:15 +0000</creation_ts>
          <short_desc>Close() should throw the same exception as send() for unpaired surrogates</short_desc>
          <delta_ts>2011-06-21 23:01:26 +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>WebSocket API (editor: Ian Hickson)</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://dev.w3.org/html5/websockets/#dom-websocket-close</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="Adrian Bateman [MSFT]">adrianba</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <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>49325</commentid>
    <comment_count>0</comment_count>
    <who name="Adrian Bateman [MSFT]">adrianba</who>
    <bug_when>2011-06-08 17:21:15 +0000</bug_when>
    <thetext>In the send() method, the spec [1] says: &quot;If the data argument has any unpaired surrogates, then raise an SYNTAX_ERR exception.&quot;

This should also apply to the close() method for the reason string [2].

[1] http://dev.w3.org/html5/websockets/#dom-websocket-send
[2] http://dev.w3.org/html5/websockets/#dom-websocket-close</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50072</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-06-21 22:57:49 +0000</bug_when>
    <thetext>Done.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50073</commentid>
    <comment_count>2</comment_count>
    <who name="">contributor</who>
    <bug_when>2011-06-21 23:01:26 +0000</bug_when>
    <thetext>Checked in as WHATWG revision r6270.
Check-in comment: Unpaired surrogates should throw an exception in close, like in send(), so we don&apos;t ask the protocol to send invalid utf-8
http://html5.org/tools/web-apps-tracker?from=6269&amp;to=6270</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>