Bug #12728
closedrgw: value of Swift API's X-Object-Manifest header is not url_decoded during segment look up
0%
Description
A try to get a dynamic large object defined with special characters in its X-Object-Manifest header leads to an error. Exact symptoms depend on used frontend/HTTP server. In case of Apache client will get 500 Internal Server Error while nginx returns 502 Bad Gateway:
$ curl -i "$publicURL/DiscImages2/HP%20Pavilion%20dv7-6c95dx%20Recovery%20Disc%20%281%20of%203%29.ISO" -X GET -H "X-Auth-Token: $token"
HTTP/1.1 502 Bad Gateway
Server: nginx/1.4.6 (Ubuntu)
Date: Wed, 19 Aug 2015 15:20:33 GMT
Content-Type: text/html
Content-Length: 181
Connection: keep-alive<html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.4.6 (Ubuntu)</center>
</body>
</html>
In debug output of radosgw we see:
2015-08-19 17:20:33.163927 7f8ecbfe7700 2 RGWGetObj::handle_user_manifest() prefix=DiscImages2_segments/HP%20Pavilion%20dv7-6c95dx%20Recovery%20Disc%20%281%20of%203%29.ISO/1439995506.197590/16/2/
Segment listing:
$ curl -i "$publicURL/DiscImages2_segments" -X GET -H "X-Auth-Token: $token"
HTTP/1.1 200
Server: nginx/1.4.6 (Ubuntu)
Date: Wed, 19 Aug 2015 15:28:44 GMT
Content-Type: text/plain; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-aliveHP Pavilion dv7-6c95dx Recovery Disc (1 of 3).ISO/1439995506.197590/16/2/00000000
HP Pavilion dv7-6c95dx Recovery Disc (1 of 3).ISO/1439995506.197590/16/2/00000001
HP Pavilion dv7-6c95dx Recovery Disc (1 of 3).ISO/1439995506.197590/16/2/00000002
HP Pavilion dv7-6c95dx Recovery Disc (1 of 3).ISO/1439995506.197590/16/2/00000003
HP Pavilion dv7-6c95dx Recovery Disc (1 of 3).ISO/1439995506.197590/16/2/00000004
HP Pavilion dv7-6c95dx Recovery Disc (1 of 3).ISO/1439995506.197590/16/2/00000005
HP Pavilion dv7-6c95dx Recovery Disc (1 of 3).ISO/1439995506.197590/16/2/00000006
HP Pavilion dv7-6c95dx Recovery Disc (1 of 3).ISO/1439995506.197590/16/2/00000007
Confirmed on v0.80.7 and current master. Others versions are probably affected too.