The server will not recognize requests if the Content-Type header contains a semi-colon followed by a charset parameter. This simple patch omits everything after the semi-colon. It's a quick fix and there are likely even prettier ways to do this.
I had a problem testing the server successfully using the Poster addon for Firefox. The appended charset param was the cause.
Thanks for a great module Hugo!
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | json_rpc-charset.patch | 865 bytes | solipsist |
| json_rpc-charset.patch | 866 bytes | solipsist |
Comments
Comment #1
solipsist commentedSwitched editor which was set to tabs instead of spaces so tabs ended up in the file. Here's a version that follows coding standards.
Comment #2
Hugo Wetterberg commentedThanks for the catch Jacob. Though I went with:
...instead. It's a tad faster and a bit more readable (to me at least).
Cheers,
Hugo
Comment #3
solipsist commentedTrue, no need to involve regexps. :)