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

Update HTTP spec: correct scope.asgi.spec_version #465

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

lazorchakp
Copy link
Contributor

@lazorchakp lazorchakp commented Aug 8, 2024

I noticed a tiny gap in the ASGI HTTP spec for scope["asgi"]["spec_version"] - all valid versions are explicitly enumerated, but that list hasn't been updated to include newer versions of the ASGI HTTP spec.

This change rewords the spec so the list of versions doesn't need to be updated every time there's a new version of the ASGI HTTP spec. I'd also be happy to just add the newer versions to this list instead, but then someone would also need to remember to update it in the future too.

I tested this by rebuilding the docs locally and viewing the changes in my browser:

image

HTTP spec this server understands; one of ``"2.0"``, ``"2.1"``, ``"2.2"`` or
``"2.3"``. Optional; if missing assume ``2.0``.
HTTP spec this server understands; for example: ``"2.0"``, ``"2.1"``, ``"2.2"``,
etc. Optional; if missing assume ``"2.0"``.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why the etc? It's just those 4 values 👀

Suggested change
etc. Optional; if missing assume ``"2.0"``.
``"2.3"``. Optional; if missing assume ``"2.0"``.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can't it also be 2.4 or 2.5 now? It's entirely possible I've misread the spec. if so I'll close this; I agree that if those are the only valid values, this change is unnecessary.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, the www spec is now up to 2.5, so I think this makes sense.

@andrewgodwin andrewgodwin merged commit b7aaa79 into django:main Aug 8, 2024
6 checks passed
@lazorchakp lazorchakp deleted the update-http-spec_version-docs branch August 8, 2024 17:15
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.

3 participants