[openstack-dev] [Swift] HEAD Object API status code

Ouchi, Atsuo ouchi.atsuo at jp.fujitsu.com
Thu May 7 00:40:20 UTC 2015


Hello Swift developers,

I would like to ask you on a Swift API specification.

Swift returns 204 status code to a valid HEAD Object request with a Content-Length header,
whereas the latest HTTP/1.1 specification (RFC7230) states that you must not send
the header with a 204 status code.

> 3.3.2.  Content-Length
(snip)
>    A server MUST NOT send a Content-Length header field in any response
>    with a status code of 1xx (Informational) or 204 (No Content).  A
>    server MUST NOT send a Content-Length header field in any 2xx
>    (Successful) response to a CONNECT request (Section 4.3.6 of
>    [RFC7231]).

What I would like to know is, when you designed Swift APIs what was the reasoning
behind choosing 204 status code to HEAD Object, over other status codes such as 200?

Thanks,
Atsuo
--
                                       Ouchi Atsuo / ouchi.atsuo at jp.fujitsu.com
                                           tel. 03-6424-6612 / ext. 72-60728968
                    Service Development Department, Foundation Service Division
                                                                Fujitsu Limited




More information about the OpenStack-dev mailing list