Open maniac777 opened 2 years ago
I've debugged out a problem a bit with colegue. He found out that in server/src/main/java/password/pwm/ws/server/rest/RestHealthServer.java there are two methods:
1. @RestMethodHandler( method = HttpMethod.GET, produces = HttpContentType.plain ) private RestResultBean doPwmHealthPlainGet( final RestRequest restRequest ) 2. @RestMethodHandler( method = HttpMethod.GET, consumes = HttpContentType.json, produces = HttpContentType.json ) private RestResultBean doPwmHealthJsonGet( final RestRequest restRequest )
This was a hint. In first method any error is catched. So this was a hint that i did not hit the first method. Setting request header "Content-Type: text/plain" clould be enaugh to make it working.
I believe that this should be fixed to give some more helpfull error message, documented or fixed in the way that content-type is not required in GET request.
For the record, this is still an issue in version 2.0.4 (forcing content-type to application/json with e.g. curl's -H workarounds the issue as well)
Describe the bug In current version of application GIT main and in previous release health reset service is not responding.
To Reproduce Steps to reproduce the behavior:
HTTP/1.1 200 Date: Tue, 21 Dec 2021 08:07:02 GMT Server: PWM Vary: Accept-Encoding Content-Language: en X-PWM-Noise: NrYK7GhqY6mqmG4prVj X-Content-Type-Options: nosniff X-XSS-Protection: 1 X-PWM-Instance: 37F1484C92C74383 X-Frame-Options: DENY X-PWM-Amb: j00s j0ur d4ddy Cache-Control: no-cache, no-store, must-revalidate, proxy-revalidate Content-Type: application/json;charset=UTF-8 Content-Length: 74 X-Robots-Tag: noindex, noarchive, nosnippet Connection: close CONTENT {"error":true,"errorCode":7000,"errorMessage":"Error_RestInvocationError"}