Author: dongxu
Date: Thu Sep 12 04:51:35 2013
New Revision: 1522405
URL: http://svn.apache.org/r1522405
Log:
Fix issue in chrome with inlined images in messages
Modified:
james/hupa/trunk/server/src/main/java/org/apache/hupa/server/servlet/DownloadAttachmentServlet.java
james/hupa/trunk/server/src/main/java/org/apache/hupa/server/utils/RegexPatterns.java
Modified:
james/hupa/trunk/server/src/main/java/org/apache/hupa/server/servlet/DownloadAttachmentServlet.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/server/src/main/java/org/apache/hupa/server/servlet/DownloadAttachmentServlet.java?rev=1522405&r1=1522404&r2=1522405&view=diff
==============================================================================
---
james/hupa/trunk/server/src/main/java/org/apache/hupa/server/servlet/DownloadAttachmentServlet.java
(original)
+++
james/hupa/trunk/server/src/main/java/org/apache/hupa/server/servlet/DownloadAttachmentServlet.java
Thu Sep 12 04:51:35 2013
@@ -110,9 +110,10 @@ public class DownloadAttachmentServlet e
>>>>>>> first commit
=======
String mode = request.getParameter(SConsts.PARAM_MODE);
- if (!"inline".equals(mode)) {
- response.setHeader("Content-disposition", "attachment;
filename="
- + attachmentName + "");
+ boolean inline = "inline".equals(mode);
+ if (!inline) {
+ response.setHeader("Content-disposition", "attachment; filename="
+ + attachmentName + "");
}
>>>>>>> merged with main trunk in apache: replacing rounded borders with gwt
>>>>>>> decorator boxes, fix Hupa-93 Hupa-94, fix IE issue
InputStream in = null;
@@ -138,17 +139,23 @@ public class DownloadAttachmentServlet e
if (in != null) {
<<<<<<< HEAD
<<<<<<< HEAD
+<<<<<<< HEAD
+=======
+>>>>>>> Fix issue in chrome with inlined images in messages
// FIXME: for some reason Chrome does not display inline
images when they have the content-length
// it's like the size reported in server is different than the
received bytes.
if (!inline) {
response.setContentLength(part.getSize());
}
+<<<<<<< HEAD
=======
response.setContentLength(part.getSize());
>>>>>>> first commit
=======
response.setContentLength(part.getSize());
>>>>>>> first commit
+=======
+>>>>>>> Fix issue in chrome with inlined images in messages
IOUtils.copy(in, out);
} else {
response.setContentLength(0);
Modified:
james/hupa/trunk/server/src/main/java/org/apache/hupa/server/utils/RegexPatterns.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/server/src/main/java/org/apache/hupa/server/utils/RegexPatterns.java?rev=1522405&r1=1522404&r2=1522405&view=diff
==============================================================================
---
james/hupa/trunk/server/src/main/java/org/apache/hupa/server/utils/RegexPatterns.java
(original)
+++
james/hupa/trunk/server/src/main/java/org/apache/hupa/server/utils/RegexPatterns.java
Thu Sep 12 04:51:35 2013
@@ -50,6 +50,7 @@ public class RegexPatterns {
public static final String repl_inlineImg = "$1'" + SConsts.HUPA +
SConsts.SERVLET_DOWNLOAD
<<<<<<< HEAD
<<<<<<< HEAD
+<<<<<<< HEAD
+ "?" + SConsts.PARAM_MODE + "=inline"
+ "&" + SConsts.PARAM_FOLDER +
"=%%FOLDER%%"
=======
@@ -58,6 +59,10 @@ public class RegexPatterns {
=======
+ "?" + SConsts.PARAM_FOLDER +
"=%%FOLDER%%"
>>>>>>> first commit
+=======
+ + "?" + SConsts.PARAM_MODE + "=inline"
+ + "&" + SConsts.PARAM_FOLDER +
"=%%FOLDER%%"
+>>>>>>> Fix issue in chrome with inlined images in messages
+ "&" + SConsts.PARAM_UID + "=%%UID%%"
+ "&" + SConsts.PARAM_NAME + "=$2'
name='cid:$2'";
@@ -110,6 +115,7 @@ public class RegexPatterns {
<<<<<<< HEAD
<<<<<<< HEAD
+<<<<<<< HEAD
}
=======
}
@@ -117,3 +123,6 @@ public class RegexPatterns {
=======
}
>>>>>>> first commit
+=======
+}
+>>>>>>> Fix issue in chrome with inlined images in messages
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]