Actions
Bug #48064
closedrgw: unnecessary payload is added at the end of the message
Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% Done:
0%
Source:
Tags:
website
Backport:
nautilus octopus
Regression:
No
Severity:
3 - minor
Reviewed:
Description
Configured s3website as follows:
Bucket s3://website/: Website configuration
Website endpoint: …
Index document: index.html
Error document: error.html
And I requested the non-existent page.
curl http://{S3WEBSITE_HOST}/website/na
Using ngrep, I captured the incoming HTTP message.
sudo /usr/sbin/ngrep -d lo port 8001 -W byline
As the below log shows, the unnecessary part was added after '###'.
##
HTTP/1.1 403 Forbidden.
Content-Length: 44.
Accept-Ranges: bytes.
Last-Modified: Fri, 30 Oct 2020 06:01:24 GMT.
x-rgw-object-type: Normal.
ETag: "b976e1540612aea9644b6526fffbb087".
x-amz-meta-s3cmd-attrs: atime:1604033858/ctime:1604033858/gid:11000/gname:irteamsu/md5:b976e1540612aea9644b6526fffbb087/mode:33188/mtime:1604033858/uid:11000/uname:irteamsu.
X-Amz-Storage-Class: STANDARD.
x-amz-request-id: tx000000000000000000017-005f9fa7b9-185f-zg1-1.
Content-Type: text/html.
Date: Mon, 02 Nov 2020 06:31:21 GMT.
Connection: Keep-Alive.
.
##
<html>
<body>
Error
</body>
</html>
###
HTTP/1.1 403 Forbidden.
Content-Length: 282.
x-amz-request-id: tx000000000000000000017-005f9fa7b9-185f-zg1-1.
Accept-Ranges: bytes.
Content-Type: text/html.
Date: Mon, 02 Nov 2020 06:31:21 GMT.
Connection: Keep-Alive.
.
#
The proper resonse should be as follows:
##
HTTP/1.1 403 Forbidden.
Content-Length: 44.
Accept-Ranges: bytes.
Last-Modified: Fri, 30 Oct 2020 06:01:24 GMT.
x-rgw-object-type: Normal.
ETag: "b976e1540612aea9644b6526fffbb087".
x-amz-meta-s3cmd-attrs: atime:1604033858/ctime:1604033858/gid:11000/gname:irteamsu/md5:b976e1540612aea9644b6526fffbb087/mode:33188/mtime:1604033858/uid:11000/uname:irteamsu.
X-Amz-Storage-Class: STANDARD.
x-amz-request-id: tx000000000000000000017-005f9fa7b9-185f-zg1-1.
Content-Type: text/html.
Date: Mon, 02 Nov 2020 06:31:21 GMT.
Connection: Keep-Alive.
.
##
<html>
<body>
Error
</body>
</html>
####
Since most HTTP libraries cut the connection after reading data of the 'CONTENT-LENGTH' header's length, there is no problem. But in some cases like nginx, the HTTP parser complains about the invalid length of the body.
Updated by Ilsoo Byun over 3 years ago
I made a related PR: https://github.com/ceph/ceph/pull/37914
Updated by Casey Bodley over 3 years ago
- Status changed from New to Fix Under Review
- Tags set to website
Updated by Or Friedmann over 3 years ago
- Status changed from Fix Under Review to Pending Backport
- Backport set to nautilus octopus
Updated by Nathan Cutler over 3 years ago
- Copied to Backport #48345: octopus: rgw: unnecessary payload is added at the end of the message added
Updated by Nathan Cutler over 3 years ago
- Copied to Backport #48346: nautilus: rgw: unnecessary payload is added at the end of the message added
Updated by Nathan Cutler over 3 years ago
- Status changed from Pending Backport to Resolved
While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".
Actions