Fix NanoHTTP 2.3.1 bug: "BAD REQUEST: Syntax error. HTTP verb .. unhandled"
authorChristian Weiske <cweiske@cweiske.de>
Fri, 3 Jun 2022 19:26:14 +0000 (21:26 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Fri, 3 Jun 2022 19:27:21 +0000 (21:27 +0200)
commita38e4ed4b9265cc882b16d22f2901cd2f07c67ee
tree9a025ccb649039cd2253b40d733628f7a287d306
parent9e93d72777abe33fa8cdd5e8f7b82b7922d929c4
Fix NanoHTTP 2.3.1 bug: "BAD REQUEST: Syntax error. HTTP verb .. unhandled"

Happens when data are POSTed or PUT without us reading them.

Bug report: https://github.com/NanoHttpd/nanohttpd/issues/356

Solution by @cowenberg in
https://github.com/NanoHttpd/nanohttpd/issues/356#issuecomment-288422714

Error message we got:
E/f       (  571): Got failure response with message: BAD REQUEST: Syntax error. HTTP verb gamer%5Bkey%5D=-----BEGIN+PUBLIC+KEY-----%0AMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDUYcfiISnlc%2FHrpRi%2BTX1keBUoY2%2FiR45q0sy6%0A3SXkzgmgQCf5Kitx6rv0djQEOP%2FcvIFYFOx8At%2FAwgzhd8ltU%2F1Z%2BRNohukXvMMiCuJr5CNhtdxp%0ABfWF%2FSTV%2FDSYPpP%2BZtLgthNhERomW8krVcgxV%2F%2B9NK2NHA0W7IJ%2FmIzffwIDAQAB%0A-----END+PUBLIC+KEY-----%0A&gamer%5Bpassword%5D=.&auth_token=00702342-0000-1111-2222-c3e1500cafe1&gamer%5Busername%5D=cweiskePUT unhandled.
src/main/java/fi/iki/elonen/NanoHTTPD.java