From c154ffcaaa8d68fa9428738391693bf6e98c7cb8 Mon Sep 17 00:00:00 2001 From: globalworming Date: Thu, 30 Oct 2014 15:59:13 +0100 Subject: [PATCH] ignore content-security-policy header and some automatic import optimization --- .../java/net/sf/sahi/response/HttpResponse.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sahi-core/src/main/java/net/sf/sahi/response/HttpResponse.java b/sahi-core/src/main/java/net/sf/sahi/response/HttpResponse.java index 796e3a08..0a650c5c 100644 --- a/sahi-core/src/main/java/net/sf/sahi/response/HttpResponse.java +++ b/sahi-core/src/main/java/net/sf/sahi/response/HttpResponse.java @@ -17,6 +17,12 @@ */ package net.sf.sahi.response; +import net.sf.sahi.StreamHandler; +import net.sf.sahi.config.Configuration; +import net.sf.sahi.util.TrafficLogger; +import net.sf.sahi.util.Utils; +import org.apache.log4j.Logger; + import java.io.BufferedOutputStream; import java.io.IOException; import java.io.InputStream; @@ -26,12 +32,6 @@ import java.util.List; import java.util.Map; -import net.sf.sahi.StreamHandler; -import net.sf.sahi.config.Configuration; -import net.sf.sahi.util.TrafficLogger; -import net.sf.sahi.util.Utils; -import org.apache.log4j.Logger; - /** * User: nraman * Date: May 13, 2005 @@ -123,6 +123,7 @@ public void modifyHeaders(boolean isKeepAlive) { // The Transfer-Encoding should never be chunked, since we are sending it sequentially removeHeader("Transfer-Encoding"); removeHeader("Transfer-encoding"); + removeHeader("Content-Security-Policy"); setContentLength(getModifiedContentLength()); }