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

Adding disposition to PostBuilder, and filename/disposition to PutBuilder #29

Merged
merged 2 commits into from
May 27, 2017

Conversation

escowles
Copy link
Contributor

  • Adds disposition method to PostBuilder
  • Adds disposition and filename methods to PutBuilder

Fixes https://jira.duraspace.org/browse/FCREPO-2502

* @param disposition the disposition value
* @return this builder
**/
public PostBuilder disposition(final String disposition) {
Copy link

Choose a reason for hiding this comment

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

The only valid value for disposition is: attachment *( ";" disposition-parm )
see: https://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.5.1

..which means that a user-provided value that is not either attachment or attachment; filename=... would not be valid.

Since @birkland's use case uses Content-Disposition: attachment, maybe it makes sense to allow a null in the existing method in which case the ; filename=... can be left off.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@awoods OK, I thought that there were more options, but since there aren't, just accepting null to create the plain attachment variation seems like the easiest thing to do here.

@awoods awoods merged commit 71485da into master May 27, 2017
@awoods awoods deleted the put-with-disposition branch May 27, 2017 16:07
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

Successfully merging this pull request may close these issues.

2 participants