Skip to content

fix: allow 'Content-Length' = "0" #1617

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

Merged

Conversation

JohnVillalovos
Copy link
Contributor

Shelly devices send a 'Content-Length' header with a value of "0". Allow this as this also means there is not a request body.

In addition give a bit more detail in the error message.

Closes: #1616

@JohnVillalovos
Copy link
Contributor Author

Bonjour @aaugustin Any feedback on this PR?

@aaugustin
Copy link
Member

I'll take care of it.

Shelly devices send a 'Content-Length' header with a value of "0".
Allow this as this also means there is not a request body.

In addition give a bit more detail in the error message.

Closes: #1616
@JohnVillalovos
Copy link
Contributor Author

I'll take care of it.

Thanks. I believe I have resolved the CI issues. I also added and updated the unit tests.

@aaugustin aaugustin merged commit 6385bdd into python-websockets:main Apr 12, 2025
@aaugustin
Copy link
Member

Thank you!

@JohnVillalovos JohnVillalovos deleted the jlvillal/shelly_fix branch April 12, 2025 07:12
@JohnVillalovos
Copy link
Contributor Author

Thank you!

My pleasure 🙂

aaugustin added a commit that referenced this pull request Apr 12, 2025
(Mostly a matter of taste.)

Refs #1617.
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.

Shelly devices send: 'Content-Length' = "0" which is being rejected by server
2 participants