yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #09082
[Bug 1238536] Re: POST with empty body results in 411 Error
httplib2 is not setting content-length to 0 if the post body is empty
(https://code.google.com/p/httplib2/issues/detail?id=143).
Certain http servers won't be happy if the content length is not set.
Tempest rest client should do that.
** Also affects: tempest
Importance: Undecided
Status: New
** Bug watch added: code.google.com/p/httplib2/issues #143
http://code.google.com/p/httplib2/issues/detail?id=143
** Changed in: tempest
Assignee: (unassigned) => Andrea Frittoli (andrea-frittoli)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1238536
Title:
POST with empty body results in 411 Error
Status in OpenStack Compute (Nova):
Invalid
Status in Tempest:
In Progress
Bug description:
Some API commands don't need a body - for example allocating a
floating IP. However making a request without a body results in a
411 error:
curl -i https://compute.systestb.hpcloud.net/v2/21240759398822/os-floating-ips -H "Content-Type: application/xml" -H "Accept: application/xml" -H "X-Auth-Token: xxx" -X POST
HTTP/1.1 411 Length Required
nnCoection: close
Content-Length: 284
Fault Name: HttpRequestReceiveError
Error Type: Default
Description: Http request received failed
Root Cause Code: -19013
Root Cause : HTTP Transport: Couldn't determine the content length
Binding State: CLIENT_CONNECTION_ESTABLISHED
Service: null
Endpoint: null
Passing an Empty body works:
curl -i https://compute.systestb.hpcloud.net/v2/21240759398822/os-floating-ips -H "Content-Type: application/xml" -H "Accept: application/xml" -H "X-Auth-Token: xxx" -X POST -d ''
HTTP/1.1 200 OK
Content-Length: 164
Content-Type: application/xml; charset=UTF-8
Date: Fri, 31 May 2013 11:13:26 GMT
X-Compute-Request-Id: req-cc2ce740-6114-4820-8717-113ea1796142
<?xml version='1.0' encoding='UTF-8'?>
<floating_ip instance_id="None" ip="15.184.42.154" fixed_ip="None" id="3f9ce21c-d192-4478-8dd1-f7eb68d70133" pool="Ext-Net"/>
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1238536/+subscriptions