yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #48052
[Bug 1475647] Re: Returns 500 if a body is included where not expected
Reviewed: https://review.openstack.org/283190
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=a22f0744a5e89e653de9772e9b2b3aaa10c74f64
Submitter: Jenkins
Branch: master
commit a22f0744a5e89e653de9772e9b2b3aaa10c74f64
Author: Niall Bunting <niall.bunting@xxxxxxx>
Date: Mon Feb 22 17:13:06 2016 +0000
Reject bodies for metadef commands
The inital commit missed the metadef commands. This now adds them in
using http://developer.openstack.org/api-ref-image-v2.html as the source
for this information.
Closes-Bug: 1475647
Change-Id: I764e09d9d0e3f2dd2d815b9eca2212075598303c
** Changed in: glance
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1475647
Title:
Returns 500 if a body is included where not expected
Status in Glance:
Fix Released
Bug description:
Overview:
If a user attaches a body to a HTTP message, where the API does not expect there to be a body the server returns a 500. This therefore affects a large part of the API.
Steps to reproduce (One example):
(1) The curl command, which includes a body:
curl -v -X GET http://16.49.137.85:9292/v2/images/5619cf1f-5c43-4a1d-a90b-aa7354e453e7 -H "X-Auth-Token: 3ee83196ecbb4a559b945ac849c1520e" -d '[]'
(2) Sends the following:
GET http://16.49.137.85:9292/v2/images/5619cf1f-5c43-4a1d-a90b-aa7354e453e7 HTTP/1.1.
User-Agent: curl/7.35.0.
Host: 16.49.137.85:9292.
Accept: */*.
Proxy-Connection: Keep-Alive.
X-Auth-Token: 3ee83196ecbb4a559b945ac849c1520e.
Content-Length: 2.
Content-Type: application/x-www-form-urlencoded.
.
[]
Actual:
The response in a 500 error.
Expected:
It may be nice if it caught the fact that a body was not expected and returned a error early, to stop the whole body being uploaded. I would like some input into what people think the expected behavior should be?
To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1475647/+subscriptions
References