Doing a PUT on a valid conditional request, If-None-Match, returns unclear statement

Bug #1563362 reported by Bill Huber
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Won't Fix
Undecided
Bathri Ajay Raj

Bug Description

The statement for a PUT on a correct If-None-Match etag returns unclear documentation where the asterik, *, does not mean anything to clients. Would have been more clear if it says that the etag as the value in the header is correct or return the PUT as a 304 - Not Modified to be consistent with other HTTP methods (GET/HEAD).

Open to some more feedback from Swift Cores.

$ curl -X HEAD -i -H "X-Auth-Token: $token" http://127.0.0.1:8080/v1/AUTH_test/Tont/c.zip -H "If-None-Match: d41d8cd98f00b204e9800998ecf8427e"
HTTP/1.1 304 Not Modified
Content-Length: 0
Accept-Ranges: bytes
Last-Modified: Tue, 29 Mar 2016 14:31:57 GMT
Etag: d41d8cd98f00b204e9800998ecf8427e
X-Timestamp: 1459261916.50985
Content-Type: application/zip
X-Trans-Id: tx4e8c4ac13db54038824ba-0056fa91f9
Date: Tue, 29 Mar 2016 14:32:25 GMT

$ curl -X PUT http://127.0.0.1:8080/v1/AUTH_test/Tont/c.zip -H "X-Auth-Token: $token" -H "If-None-Match: d41d8cd98f00b204e9800998ecf8427e" -H "Content-Length:0" -i
HTTP/1.1 400 Bad Request
Content-Length: 29
Content-Type: text/plain
X-Trans-Id: tx428051995b464f1399dbe-0056fa922a
Date: Tue, 29 Mar 2016 14:33:14 GMT

If-None-Match only supports *

Bill Huber (wbhuber)
description: updated
Changed in swift:
assignee: nobody → Bathri Ajay Raj (bathri-s)
Revision history for this message
Thiago da Silva (thiagodasilva) wrote :

Because of the eventual consistency nature of Swift, we don't have current plans to change support for 'If-none-Match' with etags, so the current response of 400 is correct, I'm not sure how we can make it more clear.

Changed in swift:
status: New → Won't Fix
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.