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

PEP role: Include trailing slash in URL to avoid 301 redirect #10288

Merged
merged 2 commits into from
Mar 24, 2022

Conversation

hugovk
Copy link
Contributor

@hugovk hugovk commented Mar 24, 2022

Subject: PEP role: Include trailing / in URL to avoid 301 redirect

Feature or Bugfix

  • Feature

Purpose

  • Link :pep:8 to https://peps.python.org/pep-0008/ instead of https://peps.python.org/pep-0008

Detail

  • Without the trailing /, there's an HTTP 301 redirect to add the slash, which adds a small but unnecessary delay

Without trailing /, the 301 may take between 20ms and 335ms (caching off)

image

image

image

With the trailing /, that request is skipped

image

image

image

  • Also update docs and docstrings to use the new form.

Relates

@tk0miya tk0miya added this to the 4.5.0 milestone Mar 24, 2022
@tk0miya tk0miya merged commit 40a8f2b into sphinx-doc:4.x Mar 24, 2022
@tk0miya
Copy link
Member

tk0miya commented Mar 24, 2022

Thanks!

@hugovk hugovk deleted the update-pep-role-url branch March 24, 2022 14:19
chrisjsewell pushed a commit to executablebooks/MyST-Parser that referenced this pull request Apr 13, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants