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

Redirector issue in TLS example #2795

Closed
4 tasks done
incognito75 opened this issue May 27, 2024 · 5 comments
Closed
4 tasks done

Redirector issue in TLS example #2795

incognito75 opened this issue May 27, 2024 · 5 comments
Labels
triage A bug report being investigated

Comments

@incognito75
Copy link

Rocket Version

0.5.0, 0.5.1

Operating System

Debian GNU/Linux 12

Rust Toolchain Version

rustc 1.78.0 (9b00956e5 2024-04-29)

What happened?

The redirector doesn't properly redirect to https port in branches v0.5.0 and v0.5.1

Browser console output:

Screenshot from 2024-05-27 11-39-40

Steps to reproduce:

  1. clone Rocket repository
  2. checkout v0.5.0 or v0.5.1
  3. cd examples/tls
  4. cargo run

Test Case

None

Log Output

None

Additional Context

The last to me known and with v0.5.0 still working example of the redirector.rs was the one before commit fd29404

System Checks

  • My bug report relates to functionality.
  • I have tested against the latest Rocket release or a recent git commit.
  • I have tested against the latest stable rustc toolchain.
  • I was unable to find this issue previously reported.
@incognito75 incognito75 added the triage A bug report being investigated label May 27, 2024
@the10thWiz
Copy link
Collaborator

This has been fixed on master. I couldn't identify the commit that fixed the issue, but the issue was that the TLS redirector would not redirect to the correct port.

@incognito75
Copy link
Author

The issue was related to versions 0.5.0 and 0.5.1 and fix from master with in these two versions non-existent Rocket::endpoints() is no worth for the newcomers which would like to try "latest/stable" version of Rocket.

SergioBenitez added a commit that referenced this issue May 29, 2024
@SergioBenitez
Copy link
Member

@incognito75 I went ahead and fixed the example in the v0.5 branch as well. Thank you for letting us know!

@incognito75
Copy link
Author

@SergioBenitez We need now only 308 permanent redirect for this example. 😊
Thank you.

@SergioBenitez
Copy link
Member

I've purposefully made it to be a temporary redirect: if you change the port or address, for instance, using a permanent redirect would mean that the example wouldn't work as excepted as the browser will cache the earlier response, redirecting you to the earlier port/address. But we want it to work even then.

Keep in mind that this is an example, not a library. The purpose is to be a stepping stone for modifications.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage A bug report being investigated
Projects
None yet
Development

No branches or pull requests

3 participants