v1: sending bad format to created_at/deleted_at returns 500
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance |
Fix Released
|
Undecided
|
Niall Bunting |
Bug Description
> POST /v1/images HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:9292
> Accept: */*
> x-auth-token: 730b8eabc2e34a1
> x-image-
> x-image-
> Content-type: application/
> x-image-
> Content-Length: 2
>
* upload completely sent off: 2 out of 2 bytes
< HTTP/1.1 500 Internal Server Error
< Content-Type: text/plain
< Content-Length: 0
< Date: Tue, 11 Aug 2015 10:50:59 GMT
< Connection: close
* Closing connection 0
* Hostname was NOT found in DNS cache
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 9292 (#0)
> POST /v1/images HTTP/1.1
> User-Agent: curl/7.35.0
> Host: localhost:9292
> Accept: */*
> x-auth-token: 730b8eabc2e34a1
> x-image-
> x-image-
> Content-type: application/
> x-image-
> Content-Length: 2
>
* upload completely sent off: 2 out of 2 bytes
< HTTP/1.1 500 Internal Server Error
< Content-Type: text/plain
< Content-Length: 0
< Date: Tue, 11 Aug 2015 10:53:38 GMT
< Connection: close
Changed in glance: | |
assignee: | nobody → Niall Bunting (niall-bunting) |
status: | New → Confirmed |
Changed in glance: | |
status: | Fix Committed → Fix Released |
I thought that making these forbidden for V1 would be to much of an api change, as someone may be using these
values as it returns a 200 when they work.
I could not work out a way to validate this as the different databases will accept different values. And depending
on what people are using as a database this could be too limiting. This lead to catching the error, that is a pretty
general database error. So it my patch it will catch that error and look for the value datetime.
This however is a very hacky way of doing things. Therefore maybe someone else will come up with a better solution.