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

Get number of bytes of UTF-8 encoded POST payload #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

scrool
Copy link

@scrool scrool commented Jul 31, 2017

It seems that POST action of physicalgraph.device.HubAction doesn't get
length of payload correctly. Without this change size of UTF-8 payload
was smaller and InfluxDB parser complained that message isn't formatted
correctly. E.g.

http/1.1 400 bad request

{"error":"unable to parse '...': invalid boolean
{"error":"unable to parse '...': missing fields

etc

resolves: #19

It seems that POST action of physicalgraph.device.HubAction doesn't get
length of payload correctly. Without this change size of UTF-8 payload
was smaller and InfluxDB parser complained that message isn't formatted
correctly. E.g.

    http/1.1 400 bad request

    {"error":"unable to parse '...': invalid boolean
    {"error":"unable to parse '...': missing fields

    etc

resolves: codersaur#19
@scrool scrool mentioned this pull request Jul 31, 2017
@scrool
Copy link
Author

scrool commented Jul 31, 2017

Note: please bear with me here. This is my first code in Groovy and I don't know what I am doing here. If that is completly wrong way to implement this let me know. But it somehow helped in my setup and I'm able to log my events.

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.

Sonos Bug
1 participant