|
|
2ea601e |
From 29ee3d684ed0a8bebd9a6024e32f05727305f9b7 Mon Sep 17 00:00:00 2001
|
|
|
2ea601e |
From: Pavel Valena <pvalena@redhat.com>
|
|
|
2ea601e |
Date: Sun, 6 Feb 2022 19:54:41 +0100
|
|
|
2ea601e |
Subject: [PATCH] Use port 80 explicitly, in tests
|
|
|
2ea601e |
|
|
|
2ea601e |
for compatibility with Ruby 3.1
|
|
|
2ea601e |
---
|
|
|
2ea601e |
spec/websocket/driver/client_spec.rb | 14 +++++++-------
|
|
|
2ea601e |
1 file changed, 7 insertions(+), 7 deletions(-)
|
|
|
2ea601e |
|
|
|
2ea601e |
diff --git a/spec/websocket/driver/client_spec.rb b/spec/websocket/driver/client_spec.rb
|
|
|
2ea601e |
index e19e595..445875b 100644
|
|
|
2ea601e |
--- a/spec/websocket/driver/client_spec.rb
|
|
|
2ea601e |
+++ b/spec/websocket/driver/client_spec.rb
|
|
|
2ea601e |
@@ -66,7 +66,7 @@ describe WebSocket::Driver::Client do
|
|
|
2ea601e |
it "writes the handshake request to the socket" do
|
|
|
2ea601e |
expect(socket).to receive(:write).with(
|
|
|
2ea601e |
"GET /socket HTTP/1.1\r\n" +
|
|
|
2ea601e |
- "Host: www.example.com\r\n" +
|
|
|
2ea601e |
+ "Host: www.example.com:80\r\n" +
|
|
|
2ea601e |
"Upgrade: websocket\r\n" +
|
|
|
2ea601e |
"Connection: Upgrade\r\n" +
|
|
|
2ea601e |
"Sec-WebSocket-Key: 2vBVWg4Qyk3ZoM/5d3QD9Q==\r\n" +
|
|
|
2ea601e |
@@ -85,7 +85,7 @@ describe WebSocket::Driver::Client do
|
|
|
2ea601e |
it "writes the handshake with Sec-WebSocket-Protocol" do
|
|
|
2ea601e |
expect(socket).to receive(:write).with(
|
|
|
2ea601e |
"GET /socket HTTP/1.1\r\n" +
|
|
|
2ea601e |
- "Host: www.example.com\r\n" +
|
|
|
2ea601e |
+ "Host: www.example.com:80\r\n" +
|
|
|
2ea601e |
"Upgrade: websocket\r\n" +
|
|
|
2ea601e |
"Connection: Upgrade\r\n" +
|
|
|
2ea601e |
"Sec-WebSocket-Key: 2vBVWg4Qyk3ZoM/5d3QD9Q==\r\n" +
|
|
|
2ea601e |
@@ -102,7 +102,7 @@ describe WebSocket::Driver::Client do
|
|
|
2ea601e |
it "writes the handshake with Sec-WebSocket-Protocol" do
|
|
|
2ea601e |
expect(socket).to receive(:write).with(
|
|
|
2ea601e |
"GET /socket HTTP/1.1\r\n" +
|
|
|
2ea601e |
- "Host: www.example.com\r\n" +
|
|
|
2ea601e |
+ "Host: www.example.com:80\r\n" +
|
|
|
2ea601e |
"Upgrade: websocket\r\n" +
|
|
|
2ea601e |
"Connection: Upgrade\r\n" +
|
|
|
2ea601e |
"Sec-WebSocket-Key: 2vBVWg4Qyk3ZoM/5d3QD9Q==\r\n" +
|
|
|
2ea601e |
@@ -129,7 +129,7 @@ describe WebSocket::Driver::Client do
|
|
|
2ea601e |
it "writes the handshake with custom headers" do
|
|
|
2ea601e |
expect(socket).to receive(:write).with(
|
|
|
2ea601e |
"GET /socket HTTP/1.1\r\n" +
|
|
|
2ea601e |
- "Host: www.example.com\r\n" +
|
|
|
2ea601e |
+ "Host: www.example.com:80\r\n" +
|
|
|
2ea601e |
"Upgrade: websocket\r\n" +
|
|
|
2ea601e |
"Connection: Upgrade\r\n" +
|
|
|
2ea601e |
"Sec-WebSocket-Key: 2vBVWg4Qyk3ZoM/5d3QD9Q==\r\n" +
|
|
|
2ea601e |
@@ -152,7 +152,7 @@ describe WebSocket::Driver::Client do
|
|
|
2ea601e |
proxy = driver.proxy("http://proxy.example.com")
|
|
|
2ea601e |
expect(socket).to receive(:write).with(
|
|
|
2ea601e |
"CONNECT www.example.com:80 HTTP/1.1\r\n" +
|
|
|
2ea601e |
- "Host: www.example.com\r\n" +
|
|
|
2ea601e |
+ "Host: www.example.com:80\r\n" +
|
|
|
2ea601e |
"Connection: keep-alive\r\n" +
|
|
|
2ea601e |
"Proxy-Connection: keep-alive\r\n" +
|
|
|
2ea601e |
"\r\n")
|
|
|
2ea601e |
@@ -163,7 +163,7 @@ describe WebSocket::Driver::Client do
|
|
|
2ea601e |
proxy = driver.proxy("http://user:pass@proxy.example.com")
|
|
|
2ea601e |
expect(socket).to receive(:write).with(
|
|
|
2ea601e |
"CONNECT www.example.com:80 HTTP/1.1\r\n" +
|
|
|
2ea601e |
- "Host: www.example.com\r\n" +
|
|
|
2ea601e |
+ "Host: www.example.com:80\r\n" +
|
|
|
2ea601e |
"Connection: keep-alive\r\n" +
|
|
|
2ea601e |
"Proxy-Connection: keep-alive\r\n" +
|
|
|
2ea601e |
"Proxy-Authorization: Basic dXNlcjpwYXNz\r\n" +
|
|
|
2ea601e |
@@ -176,7 +176,7 @@ describe WebSocket::Driver::Client do
|
|
|
2ea601e |
proxy.set_header("User-Agent", "Chrome")
|
|
|
2ea601e |
expect(socket).to receive(:write).with(
|
|
|
2ea601e |
"CONNECT www.example.com:80 HTTP/1.1\r\n" +
|
|
|
2ea601e |
- "Host: www.example.com\r\n" +
|
|
|
2ea601e |
+ "Host: www.example.com:80\r\n" +
|
|
|
2ea601e |
"Connection: keep-alive\r\n" +
|
|
|
2ea601e |
"Proxy-Connection: keep-alive\r\n" +
|
|
|
2ea601e |
"User-Agent: Chrome\r\n" +
|
|
|
2ea601e |
--
|
|
|
2ea601e |
2.26.2
|
|
|
2ea601e |
|