You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Thomas Corthals <th...@klascement.net> on 2021/01/27 17:51:01 UTC
Wrong HTTP status for HEAD request
Hi,
In Solr 8.6.1, a GET request or a HEAD request for a non-existing term in a
managed resource (stopword or synonym) returns a HTTP status "404 Not
Found".
$ curl -i "
http://localhost:8983/solr/techproducts/schema/analysis/synonyms/english/foobar"
| head -n 1
HTTP/1.1 404 Not Found
$ curl -I "
http://localhost:8983/solr/techproducts/schema/analysis/synonyms/english/foobar"
| head -n 1
HTTP/1.1 404 Not Found
In Solr 8.7.0, the same GET request still returns "404 Not Found", but the
HEAD request now returns "200 OK" as if the term actually exists.
$ curl -i "
http://localhost:8983/solr/techproducts/schema/analysis/synonyms/english/foobar"
| head -n 1
HTTP/1.1 404 Not Found
$ curl -I "
http://localhost:8983/solr/techproducts/schema/analysis/synonyms/english/foobar"
| head -n 1
HTTP/1.1 200 OK
I presume that's a bug?
Thomas