Skip to content

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

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sonos Bug
1 participant