Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-4298

DIH: 'command=show-config' returns status 200 for not existing configuration

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • 4.0
    • None
    • None

    Description

      If the Configuration is defined, the command works as expected:

       % 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>
      
      [...]

      If the Configuration is missing, the body will say so - but the Header contains still Status 200 OK

       % 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>

      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 ..

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              steffkes Stefan Matheis
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: