mirror of
https://github.com/ceph/ceph
synced 2025-01-20 01:51:34 +00:00
rgw: Do not send a Content-Type on a '304 Not Modified' response
When we say the Content has not changed we should not respond with a content type which defaults to binary/octet stream. Fixes: #15119 Signed-off-by: Wido den Hollander <wido@42on.com>
This commit is contained in:
parent
35479a92e5
commit
471fa29e64
@ -257,10 +257,14 @@ done:
|
||||
riter->second.c_str());
|
||||
}
|
||||
|
||||
if (!content_type)
|
||||
content_type = "binary/octet-stream";
|
||||
if (op_ret == ERR_NOT_MODIFIED) {
|
||||
end_header(s, this);
|
||||
} else {
|
||||
if (!content_type)
|
||||
content_type = "binary/octet-stream";
|
||||
|
||||
end_header(s, this, content_type);
|
||||
end_header(s, this, content_type);
|
||||
}
|
||||
|
||||
if (metadata_bl.length()) {
|
||||
STREAM_IO(s)->write(metadata_bl.c_str(), metadata_bl.length());
|
||||
|
Loading…
Reference in New Issue
Block a user