org.kaazing.specification.ws.extensions.x-kaazing-ping-pong.client.should.disconnect.if.wrong.control.bytes.length.request.rpt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of specification.x-kaazing-ping-pong Show documentation
Show all versions of specification.x-kaazing-ping-pong Show documentation
Specification for x-kaazing-ping-pong protocol
The newest version!
#
# Copyright 2007-2015, Kaazing Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
connect tcp://127.0.0.1:8001
connected
# Connection request
write "GET /echo?.kl=Y HTTP/1.1\r\n"
write "Upgrade: websocket\r\n"
write "Connection: Upgrade\r\n"
write "Host: localhost:8001\r\n"
write "Origin: http://localhost:8001\r\n"
write "Sec-WebSocket-Key: nDaimG37f4nUqogPypithw==\r\n"
write "Sec-WebSocket-Version: 13\r\n"
write "Sec-WebSocket-Extensions: x-kaazing-ping-pong\r\n"
write "\r\n"
# 101 Response
read "HTTP/1.1 101 Web Socket Protocol Handshake\r\n"
read "Connection: Upgrade\r\n"
read "Date:" /.*\r\n/
read "Sec-WebSocket-Accept:" /.*\r\n/
read "Sec-WebSocket-Extensions: x-kaazing-ping-pong; 00"
read "\r\n"
read "Server: Kaazing Gateway\r\n"
read "Upgrade: websocket\r\n"
read "\r\n"
# client fails the WebSocket connection because the value for the ping pong control bytes is invalid
close
closed
© 2015 - 2024 Weber Informatics LLC | Privacy Policy