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

Redirect all-caps article slugs to lowercase. #424

Merged
merged 2 commits into from
Jan 22, 2024
Merged

Redirect all-caps article slugs to lowercase. #424

merged 2 commits into from
Jan 22, 2024

Conversation

sengi
Copy link
Contributor

@sengi sengi commented Jan 20, 2024

Move this redirect functionality from nginx into Router, so that we can finally drop Perl from the nginx config.

We'll need to push this further down into the backend ("frontend") apps when we get rid of Router, but there's still value in eliminating Perl from the request path sooner rather than later.

Also some trivial style cleanup in proxy_function integration tests.

sengi added 2 commits January 20, 2024 15:09
Move this redirect functionality from nginx into Router, so that we can
finally drop Perl from the nginx config.

We'll need to push this further down into the backend ("frontend") apps
when we get rid of Router, but there's still value in eliminating Perl
from the request path sooner rather than later.
- Use the conventional `r` and `w` short names for http.Request and
  http.ResponseWriter parameters.
- Factor out ghttp.Server declaration.
- Push recorderURL down into the only test case that uses it.
- Fix missing err check on a call to URL.Parse().

No functional change (apart from the missing err check), just
readability.
@sengi sengi marked this pull request as ready for review January 22, 2024 10:43
Copy link
Contributor

@sihugh sihugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔽

@sengi sengi merged commit 2e53c1a into main Jan 22, 2024
4 checks passed
@sengi sengi deleted the sengi/lowercase branch January 22, 2024 11:04
@sengi
Copy link
Contributor Author

sengi commented Jan 22, 2024

Thanks @sihugh!

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

Successfully merging this pull request may close these issues.

2 participants