You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2022/02/12 17:17:00 UTC

[jira] [Commented] (SOLR-15116) Wrong HTTP status for HEAD request

    [ https://issues.apache.org/jira/browse/SOLR-15116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17491407#comment-17491407 ] 

ASF subversion and git services commented on SOLR-15116:
--------------------------------------------------------

Commit d60458aeae333b7697650c342ce572ade9872c51 in solr's branch refs/heads/main from Eric Pugh
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=d60458a ]

SOLR-15116: Support a HEAD request for managed resources (#495)

* Now support the HEAD verb by doing normal GET and then dropping the response body.

> Wrong HTTP status for HEAD request
> ----------------------------------
>
>                 Key: SOLR-15116
>                 URL: https://issues.apache.org/jira/browse/SOLR-15116
>             Project: Solr
>          Issue Type: Bug
>          Components: Schema and Analysis
>    Affects Versions: 8.7, 8.8, 8.9, 8.10, 8.11
>            Reporter: Thomas Corthals
>            Assignee: Eric Pugh
>            Priority: Major
>              Labels: ManagedStopwordFilterFactory, ManagedSynonymFilterFactory, REST, Solr
>         Attachments: 0001-Same-PermissionName-for-HEAD-requests-as-for-GET-req.patch
>
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> A GET request for a word that doesn't exist in a managed resource (stopwords or synonyms) returns "404 Not Found", but the HEAD request for the same child resource returns "200 OK" as if the word actually exists.
> {code:sh}
> $ 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
> {code}
> Solr 8.6.3 returns "404 Not Found" for both GET and HEAD requests for a non-existing child resource. This is how it SHOULD be according to [RFC 2616|https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4]:
> {quote}The metainformation contained in the HTTP headers in response to a HEAD request SHOULD be identical to the information sent in response to a GET request.
> {quote}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org