[ https://issues.apache.org/jira/browse/SOLR-11675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16275812#comment-16275812 ]
Jason Gerlowski commented on SOLR-11675: ---------------------------------------- I did a little bit of digging into this recently. The most relevant bit of code I could find is in the {{getApiInfo}} method of {{V2HttpCall}}: (https://github.com/apache/lucene-solr/blob/67a6a14302c159a46a5fc81e5e6e94643c288e99/solr/core/src/java/org/apache/solr/api/V2HttpCall.java#L200) {code} Api api = requestHandlers.v2lookup(path, method, parts); if (api == null && path.endsWith(CommonParams.INTROSPECT)) { // the particular http method does not have any , // just try if any other method has this path api = requestHandlers.v2lookup(path, null, parts); } if (api == null) { return getSubPathApi(requestHandlers, path, fullPath, new CompositeApi(null)); } ... {code} The {{v2Lookup}} request returns null, as you would probably expect, but then a non-null value is returned by {{getSubPathApi}}. {{getSubPathApi}} looked loosely help/introspect related, but I don't know enough about the V2 API framework to understand whether we want to be using the {{getSubPathApi}} codepath here or not. Maybe I'm looking at the wrong chunk of code altogether. Anyway, I plan to do some more digging on this soon. If I don't get to it, hopefully this pointer is helpful. > v2 API should gracefully decline unexpected HTTP methods > -------------------------------------------------------- > > Key: SOLR-11675 > URL: https://issues.apache.org/jira/browse/SOLR-11675 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Affects Versions: master (8.0) > Reporter: Gus Heck > > if one sends DELETE, PATCH or PROPFIND (and probably others) to > http://localhost:8983/api/c solr produces an unhelpful an error like this: > {code:java} > { > "error": { > "msg": "Index: 1, Size: 1", > "trace": "java.lang.IndexOutOfBoundsException: Index: 1, Size: > 1\n\tat java.util.ArrayList.rangeCheck(ArrayList.java:653)\n\tat > java.util.ArrayList.get(ArrayList.java:429)\n\tat > org.apache.solr.api.V2HttpCall.init(V2HttpCall.java:110)\n\tat > org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:470)\n\tat > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:382)\n\tat > > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:326)\n\tat > > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1751)\n\tat > > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)\n\tat > > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat > > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\n\tat > > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)\n\tat > > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)\n\tat > > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)\n\tat > > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\n\tat > > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)\n\tat > > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat > > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)\n\tat > > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)\n\tat > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)\n\tat > > org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)\n\tat > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)\n\tat > org.eclipse.jetty.server.Server.handle(Server.java:534)\n\tat > org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)\n\tat > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)\n\tat > > org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:283)\n\tat > org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:108)\n\tat > org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)\n\tat > > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)\n\tat > > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)\n\tat > > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)\n\tat > > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)\n\tat > > org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)\n\tat > java.lang.Thread.run(Thread.java:748)\n", > "code": 500 > } > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org