Skip to content

Commit

Permalink
Merge branch 'develop' into 4544-links-best-practices
Browse files Browse the repository at this point in the history
  • Loading branch information
mheppler committed Mar 31, 2018
2 parents a48fe50 + 9976264 commit a195398
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 8 deletions.
4 changes: 2 additions & 2 deletions doc/sphinx-guides/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@
# built documents.
#
# The short X.Y version.
version = '4.8.5'
version = '4.8.6'
# The full version, including alpha/beta/rc tags.
release = '4.8.5'
release = '4.8.6'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
4 changes: 2 additions & 2 deletions doc/sphinx-guides/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Dataverse 4.8.5 Guides
Dataverse 4.8.6 Guides
======================

These guides are for the most recent version of Dataverse. For the guides for **version 4.8.4** please go `here <http://guides.dataverse.org/en/4.8.4/>`_.
These guides are for the most recent version of Dataverse. For the guides for **version 4.8.5** please go `here <http://guides.dataverse.org/en/4.8.5/>`_.

.. toctree::
:glob:
Expand Down
4 changes: 2 additions & 2 deletions doc/sphinx-guides/source/user/dataset-management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ In the Terms tab, which can also be found by clicking on the Edit dropdown butto
CC0 Waiver + Dataset Terms of Use
---------------------------------

Starting with Dataverse version 4.0, all new datasets will default to a `CC0 public domain dedication
<https://creativecommons.org/publicdomain/zero/1.0/>`_ . CC0 facilitates reuse and extensibility of research data.
All new datasets created through the web UI default to a `CC0 public domain dedication
<https://creativecommons.org/publicdomain/zero/1.0/>`_ (this default is not applied to datasets created through the native API). CC0 facilitates reuse and extensibility of research data.
Our `Community Norms <https://dataverse.org/best-practices/dataverse-community-norms>`_ as well as good scientific
practices expect that proper credit is given via citation. If you are unable to give your datasets a CC0 waiver you may enter
your own custom Terms of Use for your Datasets.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>edu.harvard.iq</groupId>
<artifactId>dataverse</artifactId>
<version>4.8.5</version>
<version>4.8.6</version>
<packaging>war</packaging>

<name>dataverse</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.net.URLEncoder;
import java.nio.channels.Channel;
import java.nio.channels.Channels;
import java.nio.channels.WritableByteChannel;
Expand Down Expand Up @@ -650,7 +651,19 @@ public String generateTemporaryS3Url() throws IOException {
generatePresignedUrlRequest.setMethod(HttpMethod.GET); // Default.
generatePresignedUrlRequest.setExpiration(expiration);
ResponseHeaderOverrides responseHeaders = new ResponseHeaderOverrides();
responseHeaders.setContentDisposition("attachment; filename="+this.getDataFile().getDisplayName());
//responseHeaders.setContentDisposition("attachment; filename="+this.getDataFile().getDisplayName());
// Encode the file name explicitly specifying the encoding as UTF-8:
// (otherwise S3 may not like non-ASCII characters!)
// Most browsers are happy with just "filename="+URLEncoder.encode(this.getDataFile().getDisplayName(), "UTF-8")
// in the header. But Firefox appears to require that "UTF8" is
// specified explicitly, as below:
responseHeaders.setContentDisposition("attachment; filename*=UTF-8''"+URLEncoder.encode(this.getDataFile().getDisplayName(), "UTF-8"));
// - without it, download will work, but Firefox will leave the special
// characters in the file name encoded. For example, the file name
// will look like "1976%E2%80%932016.txt" instead of "1976–2016.txt",
// where the dash is the "long dash", represented by a 3-byte UTF8
// character "\xE2\x80\x93"

responseHeaders.setContentType(this.getDataFile().getContentType());
generatePresignedUrlRequest.setResponseHeaders(responseHeaders);

Expand Down

0 comments on commit a195398

Please sign in to comment.