Matt Kranzler
07/10/2020, 2:24 PMPOST -> <http://10.0.2.2:8080/account/login>
GET -> <http://10.0.2.2:8080/user/me>
POST -> <http://10.0.2.2:8080/user/devices>
The first two requests succeed but the third request is returning a 500 from my server with the following error:
org.springframework.security.web.firewall.RequestRejectedException: The request was rejected because the HTTP method "ST" was not included within the whitelist [HEAD, DELETE, POST, GET, OPTIONS, PATCH, PUT]
I've debugged the earliest entry point on the server side and verified the HTTP method is coming in as ST
. I've also enabled tomcat access logging and verified the request comes in with an HTTP method of ST
. On the Android/multiplatform side the ktor logging show the last request as a POST
and the Android Studio network profiler show the request as a POST
. What's even more weird is if I change the order of the requests to this:
POST -> <http://10.0.2.2:8080/account/login>
POST -> <http://10.0.2.2:8080/user/devices>
GET -> <http://10.0.2.2:8080/user/me>
it works fine and comes through as a POST
on the server side. What makes this even more difficult to track down is that I'm unable to debug on the client side because as soon as I run with the debugger or attach the debugger Android Studio and Intellij both lock up completely and I have to force quit. Does anyone have any ideas on what could be happening or any suggestions on what else to try?nschulzke
07/10/2020, 3:30 PMMatt Kranzler
07/10/2020, 3:48 PMnschulzke
07/10/2020, 3:49 PMnschulzke
07/10/2020, 3:51 PMMatt Kranzler
07/10/2020, 3:53 PMMatt Kranzler
07/16/2020, 3:19 PMContent-Type
header on the GET request of application/json
which was causing ktor to serialize an empty body to {}
. My server wouldn't process the body since it wasn't expecting it and then the next request would be made and the server would throw out the first two bytes resulting in the http method getting chopped off.nschulzke
07/16/2020, 3:47 PMMatt Kranzler
07/16/2020, 4:15 PM