Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default port for CONNECT #736

Closed
martinthomson opened this issue Feb 2, 2021 · 4 comments · Fixed by #772
Closed

Default port for CONNECT #736

martinthomson opened this issue Feb 2, 2021 · 4 comments · Fixed by #772

Comments

@martinthomson
Copy link
Contributor

The authority form as used for CONNECT describes the request target as comprising an authority, which consists of an IP or reg-name and, optionally, a port number. The example shows an explicit port of 80.

What happens if an explicit port is not included? Does the proxy use the port number associated with the implied protocol (80 if the inbound connection is TCP without TLS, 443 if it is TLS)? Or is it an error?

As far as I am aware, a port is always provided in practice. Maybe the answer is to explicitly require that the port number is always present and note that no default port can be supplied in this case as there is no scheme and therefore no associated default port.

@mnot
Copy link
Member

mnot commented Feb 2, 2021

cc @kazuho

@mnot mnot added the semantics label Feb 3, 2021
@kazuho
Copy link

kazuho commented Feb 3, 2021

@martinthomson

Maybe the answer is to explicitly require that the port number is always present and note that no default port can be supplied in this case as there is no scheme and therefore no associated default port.

+1. This is the most natural outcome based on our established consensus in H2 and H3 that CONNECT requests is not accompanied by a scheme.

@royfielding
Copy link
Member

It's supposed to be a 400 error.

@royfielding
Copy link
Member

I verified that Apache mod_proxy will respond with 400 if there is no ":" or if the port is empty or non-numeric, and 403 if the port is not configured for use.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

4 participants