On 04/10/2012 01:37 AM, Dimitar Popov wrote:
I sent some changes in the REST interface yesterday - you may try them. Basically HTTP 400 is almost alwayst thrown by the REST implementation when something is wrong (500 not that much ;) ). In my patch, I've also added more debug messages so that if you enable the debug flag it's be more easy to find the reason for the error. Regards, Dimitar
Dimitar --
I'm still reproducing this with 7.2.1-pre-20120411.230549 (today's snapshot).
That said, with DEBUG enabled, there _is_ a stack trace:
org.basex.core.BaseXException: Unknown option '<REST:COMMAND XMLNS:REST'. org.basex.core.Command.execute(Command.java:76) org.basex.server.LocalSession.execute(LocalSession.java:134) org.basex.server.Session.execute(Session.java:38) org.basex.http.rest.RESTCode.parseOption(RESTCode.java:128) org.basex.http.rest.RESTCode.parseOptions(RESTCode.java:111) org.basex.http.rest.RESTPost.run(RESTPost.java:32) org.basex.http.rest.RESTServlet.run(RESTServlet.java:14) org.basex.http.BaseXServlet.service(BaseXServlet.java:34) javax.servlet.http.HttpServlet.service(HttpServlet.java:820) org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221) org.mortbay.servlet.UserAgentFilter.doFilter(UserAgentFilter.java:78) org.mortbay.servlet.GzipFilter.doFilter(GzipFilter.java:131)
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212) org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399) org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766) org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49) org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) org.mortbay.jetty.Server.handle(Server.java:326) org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945) org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756) org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)