You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2018/09/24 15:14:37 UTC

[juneau] branch master updated: Set Content-Encoding: identity on getDirectWriter().

This is an automated email from the ASF dual-hosted git repository.

jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git


The following commit(s) were added to refs/heads/master by this push:
     new 863140b  Set Content-Encoding: identity on getDirectWriter().
863140b is described below

commit 863140b6cd9e3e47fbd46ec4716a833f2b51ab03
Author: JamesBognar <ja...@apache.org>
AuthorDate: Mon Sep 24 11:13:21 2018 -0400

    Set Content-Encoding: identity on getDirectWriter().
---
 .../src/main/java/org/apache/juneau/rest/RestResponse.java             | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResponse.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResponse.java
index 5a80b98..e8f218a 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResponse.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestResponse.java
@@ -433,7 +433,8 @@ public final class RestResponse extends HttpServletResponseWrapper {
 	 */
 	public PrintWriter getDirectWriter(String contentType) throws IOException {
 		setContentType(contentType);
-		setHeader("x-content-type-options", "nosniff");
+		setHeader("X-Content-Type-Options", "nosniff");
+		setHeader("Content-Encoding", "identity");
 		return getWriter();
 	}