Skip to content

Commit 521a88e

Browse files
authored
fix(tests) send SNI to mockbin (#14)
1 parent e4cc508 commit 521a88e

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

t/stream/001-upstream-tls.t

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ __DATA__
2020
--- stream_server_config
2121
proxy_pass mockbin.com:443;
2222
proxy_ssl on;
23-
--- stream_request
24-
GET /
25-
--- stream_response_like: ^{"message":"no Route matched with those values"}$
23+
proxy_ssl_server_name on;
24+
--- stream_request eval
25+
"GET / HTTP/1.0\r\nHost: mockbin.com\r\n\r\n"
26+
--- stream_response_like: ^HTTP/1.1 200 OK
2627
--- no_error_log
2728
[error]
2829
@@ -32,9 +33,9 @@ GET /
3233
--- stream_server_config
3334
proxy_pass mockbin.com:80;
3435
proxy_ssl off;
35-
--- stream_request
36-
GET /
37-
--- stream_response_like: ^{"message":"no Route matched with those values"}$
36+
--- stream_request eval
37+
"GET / HTTP/1.0\r\nHost: mockbin.com\r\n\r\n"
38+
--- stream_response_like: ^HTTP/1.1 200 OK
3839
--- no_error_log
3940
[error]
4041
@@ -53,8 +54,8 @@ GET /
5354
5455
assert(tls.disable_proxy_ssl())
5556
}
56-
--- stream_request
57-
GET /
57+
--- stream_request eval
58+
"GET / HTTP/1.0\r\nHost: mockbin.com\r\n\r\n"
5859
--- stream_response_like: ^.+400 The plain HTTP request was sent to HTTPS port.+$
5960
--- no_error_log
6061
[error]

0 commit comments

Comments
 (0)