Page 1 of 1
[Solved] Server returns wrong error message for client REST
Posted: 04 Sep 2015, 16:42
by troycarpenter
Code: Select all
=========================================================================================
VERSION: MADSONIC 6.0 | BUILD: 7160
SERVLET: JETTY 8.y.z-SNAPSHOT
SERVER: CPU: AMD
OS: Linux MINT (DEBIAN/Ubuntu)
SYSTEM: CLIENT
INSTALLER: DEB | RPM | DOCKER | OTHER
JAVA: 1.7.0_79
BROWSER: CHROME 45
CLIENT: MADSONIC 5.7.364
DESCRIPTION: LDAP not supported
REPRODUCIBLE: YES
=========================================================================================
Maybe I'm misunderstanding the way this works, but I tried sending a REST authentication message with the REST version as 1.10.5 (from the previous server version) as follows:
Code: Select all
https://myhost.com/rest/ping.view?u=bob&p=pass&v=1.10.5&c=myapp&f=xml
The response was:
Code: Select all
<madsonic-response xmlns="http://madsonic.org/restapi" status="failed" version="2.0.0">
<error code="30" message="Incompatible Madsonic REST protocol version. Server must upgrade."/>
</madsonic-response>
I was expecting the response to be error 20: Client must upgrade.
Re: Server returns wrong error message for client REST versi
Posted: 17 Sep 2015, 00:05
by troycarpenter
Looks like this is fixed with the new emulation code in 6.0.7450.
Client asking for higher version than server supports:
Code: Select all
http://myhost.com/rest/ping.view?u=bob&p=pass&v=2.0.5&c=myapp&f=xml
<subsonic-response xmlns="http://subsonic.org/restapi" status="failed" version="1.13.0" type="subsonic">
<error code="30" message="Incompatible REST protocol version. Server must upgrade."/>
</subsonic-response>
Client asking for lower version than server supports (using new rest2 api):
Code: Select all
http://myhost.com/rest2/ping.view?u=bob&p=pass&v=1.13.0&c=myapp&f=xml
<madsonic-response xmlns="http://madsonic.org/restapi" status="failed" version="2.0.0" type="madsonic">
<error code="20" message="Incompatible REST protocol version. Client must upgrade."/>
</madsonic-response>