Comment 2 for bug 926046

Revision history for this message
Jason Hullinger (jason-hullinger) wrote :

I am getting a timeout error upon sending -1 Content-Length after the default 60 seconds. From proxy.error log:

Feb 3 12:05:27 ubuntu proxy-server ERROR Client read timeout (60s) (txn: tx576de723117b4c11926d5fc4e275ff51) (client_ip: 172.16.12.1)

Additionally I also get a Request Timeout error back to the client:

------------------------------------------------------------

PUT /v1/AUTH_a/acontainer/test.xml HTTP/1.1
X-Auth-Token: AUTH_token
Content-Type: application/xml
Host: 172.16.12.149:8080
Content-Length: -1

<test></test>

HTTP/1.1 408 Request Timeout
Content-Length: 98
Content-Type: text/plain; charset=UTF-8
Date: Fri, 03 Feb 2012 20:05:27 GMT

408 Request Timeout

The server has waited too long for the request to be sent by the client.

------------------------------------------------------------

Upon changing the source code in /swift/common/constrains to include the check, starting at line 103:

    if req.content_length < 0:
        return HTTPBadRequest(request=req, content_type='text/plain')

I immediately receive a 400 Bad Request:

------------------------------------------------------------

PUT /v1/AUTH_a/acontainer/test.xml HTTP/1.1
X-Auth-Token: AUTH_token
Content-Type: application/xml
Host: 172.16.12.149:8080
Content-Length: -1

<test></test>

HTTP/1.1 400 Bad Request
Content-Length: 119
Content-Type: text/plain; charset=UTF-8
Date: Fri, 03 Feb 2012 20:11:33 GMT

400 Bad Request

The server could not comply with the request since it is either malformed or otherwise incorrect.

------------------------------------------------------------