<?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>17644</bug_id>
          
          <creation_ts>2012-06-28 23:46:58 +0000</creation_ts>
          <short_desc>OK I spent hours all over the web and your docs getting to grips with websocket, my question now is this.... in the the handshake....how does one actually implement the header for the websocket? there is not explanation of this anywhere... how is the head</short_desc>
          <delta_ts>2012-06-29 08:04:18 +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>Other</rep_platform>
          <op_sys>other</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc>http://www.whatwg.org/specs/web-apps/current-work/#top</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>contributor</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>bugs</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>69520</commentid>
    <comment_count>0</comment_count>
    <who name="">contributor</who>
    <bug_when>2012-06-28 23:46:58 +0000</bug_when>
    <thetext>Specification: http://www.w3.org/TR/websockets/
Multipage: http://www.whatwg.org/C#top
Complete: http://www.whatwg.org/c#top

Comment:
OK I spent hours all over the web and your docs getting to grips with
websocket, my question now is this....
in the the handshake....how does one actually implement the header for the
websocket? there is not explanation of this anywhere...

how is the header constructed in either php or javascript for the websocket
handshake for the example like:

GET /chat HTTP/1.1
	Host: server.example.com
	Upgrade: websocket
	Connection: Upgrade
	Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
	Origin: http://example.com
	Sec-WebSocket-Protocol: chat, superchat
	Sec-WebSocket-Version: 13

Because during my test...I in chrome I see the error:
Error during WebSocket handshake: &apos;Sec-WebSocket-Accept&apos; header is missing

in the server it keeps disconnecting...I am testing locally in xampp...and and
enabled the websocket that works with like: 
php -q C:\xampp\htdocs\server\server.php

but it disconnects and the chrome console shows:
Error during WebSocket handshake: &apos;Sec-WebSocket-Accept&apos; header is missing


Can I see an example of how to actually send the headers and the
Sec-WebSocket-Key in when we send the handshake?

Posted from: 87.114.223.140
User agent: Mozilla/5.0 (Windows NT 6.0) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.56 Safari/536.5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69529</commentid>
    <comment_count>1</comment_count>
    <who name="Olli Pettay">bugs</who>
    <bug_when>2012-06-29 08:04:18 +0000</bug_when>
    <thetext>Protocol is defined in the IETF spec.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>