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

fix(ext/flash): Avoid sending Content-Length when status code is 204 #15901

Merged
merged 14 commits into from Oct 5, 2022

Conversation

ayame113
Copy link
Contributor

Currently Content-Length is sent when the status code is 204. However, according to the spec, this should not be sent.
Modify the if statement below to prevent the Content-Length from being sent.

deno/ext/flash/01_http.js

Lines 154 to 156 in b26d0b8

// MUST NOT send Content-Length or Transfer-Encoding if status code is 1xx or 204.
if (status == 204 && status <= 100) {
return str;

@ayame113 ayame113 marked this pull request as draft September 14, 2022 05:44
@ayame113 ayame113 marked this pull request as ready for review September 14, 2022 08:58
@bartlomieju
Copy link
Member

@littledivy please review

@ayame113
Copy link
Contributor Author

ayame113 commented Oct 5, 2022

If any additional work is required to merge this, please let me know.😊

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

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

LGTM. Sorry for the delay 🙇

@littledivy littledivy merged commit b5425ae into denoland:main Oct 5, 2022
@ayame113
Copy link
Contributor Author

ayame113 commented Oct 5, 2022

Sorry for the delay 🙇

No problem, thanks for the review!

@ayame113 ayame113 deleted the content-len-204 branch October 5, 2022 07:04
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.

None yet

3 participants