public class

WordViewUtils

extends Object
java.lang.Object
   ↳ com.atlassian.jira.issue.views.util.WordViewUtils

Summary

Public Methods
static void writeEncodedAttachmentFilenameHeader(RequestHeaders requestHeaders, String filename, String userAgent, String encoding)
JRA-15545: when sending an attachment in a response with a filename that has non-ASCII characters in it, you must modify your headers slightly so that browsers can recognise the filename.
static void writeGenericNoCacheHeaders(RequestHeaders requestHeaders)
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static void writeEncodedAttachmentFilenameHeader (RequestHeaders requestHeaders, String filename, String userAgent, String encoding)

JRA-15545: when sending an attachment in a response with a filename that has non-ASCII characters in it, you must modify your headers slightly so that browsers can recognise the filename. Mozilla and Opera seem to deal with the headers in the same way; IE uses a "broken" way; Safari is broken all together and will not work unless the URL matches the filename.

Parameters
requestHeaders the headers of the response
filename the filename to send to the client; should already be URL Encoded!
userAgent the user agent string from the client's request
encoding the encoding used by JIRA (e.g. UTF-8)
See Also
  • http://www.faqs.org/rfcs/rfc2231.html, https://bugs.webkit.org/show_bug.cgi?id=15287

public static void writeGenericNoCacheHeaders (RequestHeaders requestHeaders)