SOLR-10715: Welcome message should work for _introspect

This commit is contained in:
Cao Manh Dat 2017-06-12 10:46:38 +07:00
parent 6075956b65
commit 41d12df6d2
4 changed files with 11 additions and 1 deletions

View File

@ -156,6 +156,8 @@ Bug Fixes
* SOLR-10223: Allow running examples as root on Linux with -force option (janhoy)
* SOLR-10715: /v2/ should not be an alias for /v2/collections (Cao Manh Dat)
Optimizations
----------------------

View File

@ -79,7 +79,7 @@ public class V2HttpCall extends HttpSolrCall {
String fullPath = path = path.substring(7);//strip off '/____v2'
try {
pieces = getPathSegments(path);
if (pieces.size() == 0) {
if (pieces.size() == 0 || (pieces.size() == 1 && path.endsWith(CommonParams.INTROSPECT))) {
api = new Api(null) {
@Override
public void call(SolrQueryRequest req, SolrQueryResponse rsp) {

View File

@ -57,6 +57,10 @@ public class V2ApiIntegrationTest extends SolrCloudTestCase {
new V2Request.Builder("").build());
NamedList header = (NamedList) res.get("responseHeader");
assertEquals(0, header.get("status"));
res = cluster.getSolrClient().request(new V2Request.Builder("/_introspect").build());
header = (NamedList) res.get("responseHeader");
assertEquals(0, header.get("status"));
}
@Test

View File

@ -42,6 +42,10 @@ public class V2StandaloneTest extends SolrTestCaseJ4{
NamedList res = client.request(new V2Request.Builder("/").build());
NamedList header = (NamedList) res.get("responseHeader");
assertEquals(0, header.get("status"));
res = client.request(new V2Request.Builder("/_introspect").build());
header = (NamedList) res.get("responseHeader");
assertEquals(0, header.get("status"));
}
jetty.stop();