anchor.diff:  
   
   %% Internal functions
  -get_origin_header(#headers{other=L}) ->
  +origin_header(Headers) ->
  +    query_header("origin", Headers).
  +
  +protocol_header(Headers) ->
  +    query_header("sec-websocket-protocol", Headers, "unknown").
  +
  +				   
  +query_header(HeaderName, Headers) ->
  +    query_header(HeaderName, Headers, undefined).
  +    
  +query_header(Header, #headers{other=L}, Default) ->
       lists:foldl(fun({http_header,_,K0,_,V}, undefined) ->
                           K = case is_atom(K0) of
                                   true ->
  
positive.code:                                     K0
                              end,
                          case string:to_lower(K) of
                              "origin" ->
                                  V;
                              _ ->
                                  undefined
                          end;
                     (_, Acc) ->
                          Acc
                  end, undefined, L).
  
  unpack_length(Binary, LenBytes, Length) ->
      <<_, _:LenBytes/bytes, B, _/bitstring>> = Binary,
      B_v = B band 16#7F,
  
negative.code: 	    end
      end,
      exit(normal).
  
  
  handshake(ws_76, Arg, CliSock, WebSocketLocation, Origin, Protocol) ->
      {ok, Challenge} = gen_tcp:recv(CliSock, 8),
      Key1 = secret_key("sec-websocket-key1", Arg#arg.headers),
      Key2 = secret_key("sec-websocket-key2", Arg#arg.headers),
      ChallengeResponse = challenge(Key1, Key2, binary_to_list(Challenge)),
      ["HTTP/1.1 101 Web Socket Protocol Handshake\r\n",
       "Upgrade: WebSocket\r\n",
       "Connection: Upgrade\r\n",
       "Sec-WebSocket-Origin: ", Origin, "\r\n",
       "Sec-WebSocket-Location: ", WebSocketLocation, "\r\n",
       "Sec-WebSocket-Protocol: ", Protocol, "\r\n",
       "\r\n", ChallengeResponse];
  
  handshake(ws_75, _Arg, _CliSock, WebSocketLocation, Origin, Protocol) ->
      ["HTTP/1.1 101 Web Socket Protocol Handshake\r\n",
       "Upgrade: WebSocket\r\n",
       "Connection: Upgrade\r\n",
       "WebSocket-Origin: ", Origin, "\r\n",
       "WebSocket-Location: ", WebSocketLocation, "\r\n",
       "\r\n"].
  
  
  ws_version(Headers) ->
      case query_header("sec-websocket-key1", Headers) of
  	undefined ->  ws_75;
  	_         ->  ws_76
      end.
  
  
  %% This should take care of all the Data Framing scenarios specified in
  