Non standard 100-continue behaviour

Bug #1070025 reported by David Hadas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Undecided
David Hadas

Bug Description

RFC 2616 indicates:
 The purpose of the 100 (Continue) status (see section 10.1.1) is to allow a client that is sending a request message with a request body to determine if the origin server is willing to accept the request (based on the request headers) before the client sends the request body. In some cases, it might either be inappropriate or highly inefficient for the client to send the body if the server will reject the message without looking at the body.
...
      - A client MUST NOT send an Expect request-header field (section 14.20) with the "100-continue" expectation if it does not intend
        to send a request body.

Swift proxy server, when communicating with the back-end servers ALWAYS sends 100-continue. Even if the length headers indicate that there is no body (content-length: 0). This behavior is not inline with the standard.
As a minimum, swift must avoid sending 100-continue for PUT requests without a body (content-length is zero).
It is highly desired that the swift would also avoid sending 100-continue for any objects below some threshold (e.g. 64K)
Alternatively, this threshold may be configurable.

Changed in swift:
assignee: nobody → David Hadas (david-hadas)
Changed in swift:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

Reviewed: https://review.openstack.org/14663
Committed: http://github.com/openstack/swift/commit/6c6b84b3f5297128b277b0f20c70919250843ae3
Submitter: Jenkins
Branch: master

commit 6c6b84b3f5297128b277b0f20c70919250843ae3
Author: David Hadas <email address hidden>
Date: Tue Oct 23 10:07:53 2012 +0200

    Fix non standard 100-continue behaviour

    Swift proxy server, when communicating with
    the back-end servers ALWAYS sends 100-continue.
    Even if the length headers indicate that there
    is no body (content-length: 0).
    This behavior is not inline with the standard.
    RFC2616:8.2.3 disallows 100-continue
            for req.content_length==0

    This fix removes 100-continue during PUT requests
    without a body while maintining the ability for
    handoff in case of faliure.

    On branch bp/wsgi-application-interface-5
       modified: swift/proxy/controllers/obj.py

    Fixes: Bug #1070025
    Implements Blueprint: wsgi-application-interface

    Change-Id: Ia4eb8b886a74968cca4e8bde208641b37f2c104c

Changed in swift:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in swift:
milestone: none → 1.7.5
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.