Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hammer: rgw: refrain from sending Content-Type/Content-Length for 304 responses #8379

Merged
merged 6 commits into from Jul 29, 2016
Merged
10 changes: 7 additions & 3 deletions src/rgw/rgw_rest_s3.cc
Expand Up @@ -167,10 +167,14 @@ int RGWGetObj_ObjStore_S3::send_response_data(bufferlist& bl, off_t bl_ofs, off_
s->cio->print("%s: %s\r\n", riter->first.c_str(), riter->second.c_str());
}

if (!content_type)
content_type = "binary/octet-stream";
if (ret == ERR_NOT_MODIFIED) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure this should be ret == -ERR_NOT_MODIFIED

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind creating an issue at http://tracker.ceph.com/projects/rgw/issues/new for that ? It's in master and should be fixed there.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()) {
s->cio->write(metadata_bl.c_str(), metadata_bl.length());
Expand Down