incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r587502 - /incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/scripting/SlingScriptResolver.java
Date Tue, 23 Oct 2007 13:27:43 GMT
Author: bdelacretaz
Date: Tue Oct 23 06:27:43 2007
New Revision: 587502

URL: http://svn.apache.org/viewvc?rev=587502&view=rev
Log:
bugfix - SlingScriptResolver did not set response Content-Type

Modified:
    incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/scripting/SlingScriptResolver.java

Modified: incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/scripting/SlingScriptResolver.java
URL: http://svn.apache.org/viewvc/incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/scripting/SlingScriptResolver.java?rev=587502&r1=587501&r2=587502&view=diff
==============================================================================
--- incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/scripting/SlingScriptResolver.java
(original)
+++ incubator/sling/whiteboard/microsling/src/main/java/org/apache/sling/microsling/scripting/SlingScriptResolver.java
Tue Oct 23 06:27:43 2007
@@ -115,6 +115,10 @@
             };
             final PrintWriter pw = new PrintWriter(resp.getWriter());
             props.put(ScriptEngine.OUT, pw);
+            
+            // TODO the chosen Content-Type should be available
+            // based on the actual decision made...where?
+            resp.setContentType(ctx.getPreferredResponseContentType() + "; charset=UTF-8");
 
             // evaluate the script now using the ScriptEngine
             script.getScriptEngine().eval(script.getScriptSource(), props);



Mime
View raw message