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 handling of status code <100, 204 or 304 #353

Merged
merged 3 commits into from
Aug 11, 2022

Conversation

Goldziher
Copy link
Contributor

@Goldziher Goldziher commented Aug 11, 2022

This PR updates the handling of 204, 304 and <100 status codes by raising an exception when route handlers specify a route annotation. It also updates the serialization to return a 0 length byte string, which will prevent uvicorn from raising an issue.

See: encode/starlette#1764 for context.

@Goldziher Goldziher marked this pull request as ready for review August 11, 2022 09:35
@Goldziher Goldziher requested review from peterschutt and cofin August 11, 2022 09:35
@Goldziher Goldziher merged commit 52ea5e3 into main Aug 11, 2022
@Goldziher Goldziher deleted the update-no-content-handling branch August 11, 2022 09:39
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

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.

1 participant