[
https://issues.apache.org/jira/browse/SOLR-4298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alexandre Rafalovitch resolved SOLR-4298.
-----------------------------------------
Resolution: Won't Fix
> DIH: 'command=show-config' returns status 200 for not existing configuration
> ----------------------------------------------------------------------------
>
> Key: SOLR-4298
> URL: https://issues.apache.org/jira/browse/SOLR-4298
> Project: Solr
> Issue Type: Improvement
> Components: contrib - DataImportHandler
> Affects Versions: 4.0
> Reporter: Stefan Matheis
> Priority: Minor
>
> If the Configuration is defined, the command works as expected:
> {code} % curl -i
> 'http://host:8983/solr/collection1/dataimport?command=show-config&indent=true'
>
> HTTP/1.1 200 OK
> Cache-Control: no-cache, no-store
> Pragma: no-cache
> Expires: Sat, 01 Jan 2000 01:00:00 GMT
> Last-Modified: Fri, 11 Jan 2013 21:37:11 GMT
> ETag: "13c2b8b8c58"
> Content-Type: application/xml
> Content-Length: 748
> <dataConfig>
> [...]{code}
> If the Configuration is missing, the body will say so - but the Header
> contains still Status *200 OK*
> {code} % curl -i
> 'http://host:8983/solr/collection1/dataimport-no-config?command=show-config&indent=true'
> HTTP/1.1 200 OK
> Cache-Control: no-cache, no-store
> Pragma: no-cache
> Expires: Sat, 01 Jan 2000 01:00:00 GMT
> Last-Modified: Fri, 11 Jan 2013 21:37:01 GMT
> ETag: "13c2b8b6492"
> Content-Type: application/xml; charset=UTF-8
> Transfer-Encoding: chunked
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
> <lst name="responseHeader">
> <int name="status">0</int>
> <int name="QTime">0</int>
> </lst>
> <str name="status">Configuration not found</str>
> </response>{code}
> If that would be changed to something like (let's say) *404 Not Found*, we
> would be able to show an appropriate Error Message at the Admin UI -
> otherwise we have to parse the xml-response, try to match strings ..
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]