/api/positions fails with 3.14 update

accessing http://demo5.traccar.org/api/positions/ by the browser will throw

ERR_INVALID_RESPONSE

accessing http://demo5.traccar.org/api/positions/ by a REST Client with header

Content-Type: application/json
Accept: *
authorization: Basic "some_token"

will throw

Manager access required - SecurityException (PermissionsManager:158 < *:270 < PositionResource:76 < ...)

Also tried in a personal VPS, same request with admin user in REST Client and threw NullPointerException. All worked in the previous version. ¿Any ideas?

Anton Tananaev7 years ago

Your accept header is wrong. You should use application/json.

Header

Content-Type: application/json
Accept: application/json
authorization: Basic "some_token"

did the trick. Is there a logic reason to force us to put that header? It wasn't necessary in previous versions. Is it necessary for being REST?

Thank you Anton for the answer and for this amazing application.

Anton Tananaev7 years ago

It was necessary in previous version as well, but it can randomly work without it.