incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1416536 - /sling/trunk/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleInstallMojo.java
Date Mon, 03 Dec 2012 14:19:49 GMT
Author: cziegeler
Date: Mon Dec  3 14:19:48 2012
New Revision: 1416536

URL: http://svn.apache.org/viewvc?rev=1416536&view=rev
Log:
SLING-2692 :  Referer header should be set to about:blank when posting to the web console


Modified:
    sling/trunk/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleInstallMojo.java

Modified: sling/trunk/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleInstallMojo.java
URL: http://svn.apache.org/viewvc/sling/trunk/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleInstallMojo.java?rev=1416536&r1=1416535&r2=1416536&view=diff
==============================================================================
--- sling/trunk/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleInstallMojo.java
(original)
+++ sling/trunk/maven/maven-sling-plugin/src/main/java/org/apache/sling/maven/bundlesupport/AbstractBundleInstallMojo.java
Mon Dec  3 14:19:48 2012
@@ -256,9 +256,11 @@ abstract class AbstractBundleInstallMojo
             throws MojoExecutionException {
 
         // append pseudo path after root URL to not get redirected for nothing
-        PostMethod filePost = new PostMethod(targetURL + "/install");
+        final PostMethod filePost = new PostMethod(targetURL + "/install");
 
         try {
+            // set referrer
+            filePost.setRequestHeader("referer", "about:blank");
 
             List<Part> partList = new ArrayList<Part>();
             partList.add(new StringPart("action", "install"));



Mime
View raw message