When using conditional GET with range header request, proxy returns 416

Bug #1196805 reported by Eohyung Lee
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
Fix Released
Undecided
Unassigned

Bug Description

When client requests conditional GET with range header,
proxy returns 416 response(Requested Range Not Satisfiable).
But it should returns 304 response.

#just get file
root@swift-saio:~# curl -v -H 'X-Auth-token: AUTH_tke80f06d6b968400bb3abeb3a3d509b05' http://127.0.0.1:8080/v1/AUTH_test/f/f
* About to connect() to 127.0.0.1 port 8080 (#0)
* Trying 127.0.0.1... connected
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> GET /v1/AUTH_test/f/f HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15
> Host: 127.0.0.1:8080
> Accept: */*
> X-Auth-token: AUTH_tke80f06d6b968400bb3abeb3a3d509b05
>
< HTTP/1.1 200 OK
< Content-Length: 3086
< Accept-Ranges: bytes
< Last-Modified: Tue, 02 Jul 2013 04:48:20 GMT
< Etag: 227f17fd198e9217a35c9d1bcd7d6f78
< X-Timestamp: 1372740500.91789
< Content-Type: application/octet-stream
< Date: Tue, 02 Jul 2013 04:52:47 GMT
<
...........<body>............
* Connection #0 to host 127.0.0.1 left intact
* Closing connection #0

#conditional GET
root@swift-saio:~# curl -v -H 'X-Auth-token: AUTH_tke80f06d6b968400bb3abeb3a3d509b05' http://127.0.0.1:8080/v1/AUTH_test/f/f -H 'If-Modified-Since: Tue, 02 Jul 2013 05:48:20 GMT'
* About to connect() to 127.0.0.1 port 8080 (#0)
* Trying 127.0.0.1... connected
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> GET /v1/AUTH_test/f/f HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15
> Host: 127.0.0.1:8080
> Accept: */*
> X-Auth-token: AUTH_tke80f06d6b968400bb3abeb3a3d509b05
> If-Modified-Since: Tue, 02 Jul 2013 05:48:20 GMT
>
< HTTP/1.1 304 Not Modified
< Accept-Ranges: bytes
< Content-Type: text/html; charset=UTF-8
< Content-Length: 0
< Date: Tue, 02 Jul 2013 04:49:17 GMT
<
* Connection #0 to host 127.0.0.1 left intact
* Closing connection #0

#conditional GET with range header
root@swift-saio:~# curl -v -H 'X-Auth-token: AUTH_tke80f06d6b968400bb3abeb3a3d509b05' http://127.0.0.1:8080/v1/AUTH_test/f/f -H 'If-Modified-Since: Tue, 02 Jul 2013 05:48:20 GMT' -H "Range: bytes=10-34"
* About to connect() to 127.0.0.1 port 8080 (#0)
* Trying 127.0.0.1... connected
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> GET /v1/AUTH_test/f/f HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15
> Host: 127.0.0.1:8080
> Accept: */*
> X-Auth-token: AUTH_tke80f06d6b968400bb3abeb3a3d509b05
> If-Modified-Since: Tue, 02 Jul 2013 05:48:20 GMT
> Range: bytes=10-34
>
< HTTP/1.1 416 Requested Range Not Satisfiable
< Accept-Ranges: bytes
< Content-Type: text/html; charset=UTF-8
< Content-Length: 0
< Date: Tue, 02 Jul 2013 04:49:29 GMT
<
* Connection #0 to host 127.0.0.1 left intact
* Closing connection #0

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to swift (master)

Fix proposed to branch: master
Review: https://review.openstack.org/35244

Changed in swift:
assignee: nobody → Eohyung Lee (leoh0)
status: New → In Progress
Eohyung Lee (leoh0)
summary: - When using conditional GET with range header request, proxy returns 416
+ Bugs when using conditional GET
Eohyung Lee (leoh0)
summary: - Bugs when using conditional GET
+ When using conditional GET with range header request, proxy returns 416
Revision history for this message
Daisuke Morita (morita-daisuke) wrote :
Revision history for this message
John Dickinson (notmyname) wrote :

Based on Daisuke's comment and my inability to recreate this against current master, I'm closing this bug

Changed in swift:
status: In Progress → Fix Released
assignee: Eohyung Lee (leoh0) → nobody
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.