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

Upgrade connection from HTTP to HTTPS #417

Open
daxpedda opened this issue Jan 26, 2020 · 2 comments
Open

Upgrade connection from HTTP to HTTPS #417

daxpedda opened this issue Jan 26, 2020 · 2 comments
Labels
feature New feature or request

Comments

@daxpedda
Copy link

I have a case where I want to host a server on a non-standard port, like 8000 for example.

What I want is that users enter asd.com:8000 and it would lead them directly to the server, which currently isn't possible in combination with tls, because most browsers automatically connect to http by default, which will be denied.

So my question: is upgrading from http to https without having to provide your own TlsAcceptor in the scope of warp?

I'm already working on a PR.

@seanmonstar
Copy link
Owner

It sounds like a good feature! Perhaps optional, since if someone has taken care of this outside warp, no need to pay the cost.

@seanmonstar seanmonstar added the feature New feature or request label Jan 27, 2020
@daxpedda
Copy link
Author

Perhaps optional, since if someone has taken care of this outside warp, no need to pay the cost.

Agreed.

Sadly my endeavours into this have failed. Can you give me any pointer on how this could possibly be implemented?

I tried going through TlsAcceptor and I understand the part that returns a failure, but it seems that the failure is ultimately handled in hyper::Server. Following the trail there, it seems hyper::Server does have no functionality to handle a failure like that by sending a header back, am I correct with this assumption?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants