Skip to content

Commit 8f1c341

Browse files
authored
Update src/client/encode.rs
1 parent 0e1c3d1 commit 8f1c341

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/client/encode.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ impl Encoder {
4141
url.push_str(query);
4242
}
4343

44+
// A client sending a CONNECT request MUST consists of only the host
45+
// name and port number of the tunnel destination, separated by a colon.
46+
// See: https://tools.ietf.org/html/rfc7231#section-4.3.6
4447
if req.method() == Method::Connect {
4548
let host = req.url().host_str();
4649
let host = host.ok_or_else(|| format_err!("Missing hostname"))?;

0 commit comments

Comments
 (0)