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!

CommentFileSizeAuthor
#1 json_rpc-charset.patch865 bytessolipsist
json_rpc-charset.patch866 bytessolipsist

Comments

solipsist’s picture

StatusFileSize
new865 bytes

Switched editor which was set to tabs instead of spaces so tabs ended up in the file. Here's a version that follows coding standards.

Hugo Wetterberg’s picture

Status: Needs review » Fixed

Thanks for the catch Jacob. Though I went with:

list($content_type) = explode(';', $_SERVER['CONTENT_TYPE'], 2);

...instead. It's a tad faster and a bit more readable (to me at least).

Cheers,
Hugo

solipsist’s picture

True, no need to involve regexps. :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.