-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
PUT and content-length #7
Comments
It's definitely a bug in the Crestron SDK because the content source is being set to string for every other method except GET. DELETE probably could've been added to that exclusion list, although if there's a defined content string then the underlying libraries should be setting the header. |
Thanks, is there a way to report this bug to Crestron? |
You'd have to go through TrueBlue support, although I suspect this would still take some time to be acknowledged and fixed. There may be some properties that can be set to force it to send the Content-Length header, although by default it's not working as it should. When the content source and content is set, it should be sending that length in the applicable Content-Length header, always. |
Are you trying to send an empty string for the content of your PUT request? |
No, my content string was set, i think i'm missing content-source. We currently do not have access to the Simpl #, so I believe that for now it is infeasible for us to report the bug |
I have contacted TrueBlue support, let you know if I have updates |
I understand that it's missing, the point I was attempting to make above is that you don't have to do this for a POST request because this is intended to be controlled by the Crestron class itself when the content is set. This is also how Microsoft's .NET 4.5+ HttpClient class works, but it doesn't miss including the Content-Length header (it does as it should). |
In the example above, in fact, I did not manually add the content length, I would like it to be inserted automatically by the Crestron class also in the PUT :) |
We are using this module to develop a driver for a BOSE soundbar.
We have successfully implemented the GET and POST methods.
Testing with postman the same parameters used in the POST, in the PUT it works correctly.
While with the PUT method on Crestron we get the error '411 - Length Required'.
We tried to manually insert the Content-Length in the header but without success.
Is the Content-Length in the PUT implemented and sent in the request?
The text was updated successfully, but these errors were encountered: