tidwall / tile38

Real-time Geospatial and Geofencing
https://tile38.com
MIT License
9.15k stars 570 forks source link

HTTP POST results in invalid argument response #12

Closed davidxv closed 8 years ago

davidxv commented 8 years ago

Hello: First off - I love the idea of Tile38. Thank you.

I'm trying to use HTTP POSTs to talk to the tile38-server but, regardless of trying from Ruby or Java, I keep getting invalid argument responses like this: {"ok":false,"err":"invalid argument '500\r\n'","elapsed":"66.045µs"}

It seems that the return-newline pair in the request body is being run on to the last parameter in the command string which, of course, results in a parse error.

To compound matters, I know nothing about Go! Any advice?

Thanks,

David.

tidwall commented 8 years ago

@davidxv Thanks for the kind words! I found the root of the problem. I'll post a fix right away.

tidwall commented 8 years ago

I just pushed the fix to master. Please let me know if this doesn't work for you. Thanks for help.

davidxv commented 8 years ago

Absolute star - works fine for me now. Java (HttpUrlConnection) and Ruby (Faraday gem) alike. Great work - and thank you for the rapid response. :)