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

Add support for Content-Encoding for objects #332

Open
jmwski opened this issue Oct 16, 2017 · 3 comments
Open

Add support for Content-Encoding for objects #332

jmwski opened this issue Oct 16, 2017 · 3 comments

Comments

@jmwski
Copy link
Contributor

jmwski commented Oct 16, 2017

To support this change, which is documented at https://devhub.joyent.com/jira/browse/MANTA-3440, we want to add a --encoding option to the mmpu create command and allow a 'content-encoding' header to be stored in the upload record and then copied into the target object record on mmpu commit.

@davepacheco
Copy link
Contributor

Sorry if this is a dumb question, but is there any reason we can't use the existing "-H/--header" option for this?

@jmwski
Copy link
Contributor Author

jmwski commented Oct 16, 2017

In the codepath for mmpu create, the options (--size, --copies, --md5) take precedence over equivalent values that are added with -H. I think the reason for this was to separate headers that apply to the request itself with headers that describe the target object.

@jordanhendricks
Copy link
Contributor

jordanhendricks commented Oct 16, 2017

The flags --size, --copies, and --md5 are provided mostly as a convenience for the CLI user. The values passed in with the flag only take precedence if the same header is added using "-H": e.g., mmpu create --size 5 -H 'content-length:10' ~~/stor/foo would store "content-length": 5 on the target object. I would expect using "-H" to work as a way to provide the content-encoding header -- if it doesn't, that's a bug.

That said, I'm not opposed to having an additional flag to making specifying the encoding more convenient, as we do with content-{length,md5} and durability-level. But it shouldn't be strictly needed to store the header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants