cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gkossakow...@apache.org
Subject svn commit: r530854 - /cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/ServletConnection.java
Date Fri, 20 Apr 2007 17:12:11 GMT
Author: gkossakowski
Date: Fri Apr 20 10:12:10 2007
New Revision: 530854

URL: http://svn.apache.org/viewvc?view=rev&rev=530854
Log:
Mark POST calls as POST requests and check if there is anything to POST.

Modified:
    cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/ServletConnection.java

Modified: cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/ServletConnection.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/ServletConnection.java?view=diff&rev=530854&r1=530853&r2=530854
==============================================================================
--- cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/ServletConnection.java
(original)
+++ cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-impl/src/main/java/org/apache/cocoon/servletservice/ServletConnection.java
Fri Apr 20 10:12:10 2007
@@ -102,7 +102,10 @@
     	//if already connected, do nothing
     	if (connected) return;
     	
-    	request.setInputStream(new ByteArrayInputStream(requestBody.toByteArray()));
+    	if (requestBody != null) {
+    		request.setInputStream(new ByteArrayInputStream(requestBody.toByteArray()));
+    		request.setMethod("POST");
+    	}
     	
         ByteArrayOutputStream os = new ByteArrayOutputStream();
         this.response.setOutputStream(os);



Mime
View raw message