Object Storage API tests: Tempest enforces behavior strictly prohibited by RFC 7230

Bug #1536251 reported by Radoslaw Zarzynski on 2016-01-20
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tempest
Undecided
Radoslaw Zarzynski

Bug Description

Tempest enforces presence of Content-Length HTTP header through
a check in the "match" method of "ExistsAllResponseHeaders" class.
There is no exception even for a 204 response.

However, RFC 7230 clearly states [1]:

    "A server MUST NOT send a Content-Length header field in any
    response with a status code of 1xx (Informational) or 204 (No
    Content)."

This issue has been recently fixed in Ceph RadosGW. Separate bug
report will be submitted to Swift as well.

[1] Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and
    Routing, section 3.2.2., page 30.
    https://tools.ietf.org/html/rfc7230#section-3.3.2

summary: - Object Storage API tests: Tempest enforces behaviour strictly prohiited
+ Object Storage API tests: Tempest enforces behavior strictly prohibited
by RFC 7230
Radoslaw Zarzynski (rzarzynski) wrote :

Initial version of the fix is already prepared. It will be sent
to review soon.

Fix proposed to branch: master
Review: https://review.openstack.org/272062

Changed in tempest:
assignee: nobody → Radoslaw Zarzynski (rzarzynski)
status: New → In Progress

Reviewed: https://review.openstack.org/272062
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=c22ef48aecd6c7dd6d7c0ee2b4632abf7140b341
Submitter: Jenkins
Branch: master

commit c22ef48aecd6c7dd6d7c0ee2b4632abf7140b341
Author: Radoslaw Zarzynski <email address hidden>
Date: Mon Jan 25 10:54:07 2016 +0100

    Fix checks for content length in object storage tests.

    Tempest verifies whether HTTP response have "Content-Length"
    header specified. However, the checks do not have exceptions
    for the cases clearly mentioned in the RFC 7230:

      "A server MUST NOT send a Content-Length header field in
      any response with a status code of 1xx (Informational) or
      204 (No Content)."

    This patch rectifies the checks to not enforce presence of
    the Content-Length in such cases.

    Change-Id: I725982dbcf1f1ea4ffb2bb7106aefdd3029d3e03
    Closes-Bug: #1536251

Changed in tempest:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers