cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gkossakow...@apache.org
Subject svn commit: r530855 - /cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/postable/components/ServletServiceConsumerSourceFactory.java
Date Fri, 20 Apr 2007 17:13:42 GMT
Author: gkossakowski
Date: Fri Apr 20 10:13:41 2007
New Revision: 530855

URL: http://svn.apache.org/viewvc?view=rev&rev=530855
Log:
ServletServiceConsumerSource can only work with POST requests.

Modified:
    cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/postable/components/ServletServiceConsumerSourceFactory.java

Modified: cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/postable/components/ServletServiceConsumerSourceFactory.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/postable/components/ServletServiceConsumerSourceFactory.java?view=diff&rev=530855&r1=530854&r2=530855
==============================================================================
--- cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/postable/components/ServletServiceConsumerSourceFactory.java
(original)
+++ cocoon/trunk/core/cocoon-servlet-service/cocoon-servlet-service-components/src/main/java/org/apache/cocoon/servletservice/postable/components/ServletServiceConsumerSourceFactory.java
Fri Apr 20 10:13:41 2007
@@ -20,6 +20,8 @@
 import java.net.MalformedURLException;
 import java.util.Map;
 
+import javax.servlet.http.HttpServletRequest;
+
 import org.apache.cocoon.processing.ProcessInfoProvider;
 import org.apache.excalibur.source.Source;
 import org.apache.excalibur.source.SourceFactory;
@@ -29,8 +31,9 @@
 	private ProcessInfoProvider processInfoProvider;
 
 	public Source getSource(String location, Map parameters) throws IOException, MalformedURLException
{
-		return new ServletServiceConsumerSource(processInfoProvider.getRequest());
-		
+		HttpServletRequest request = processInfoProvider.getRequest();
+		if (!"POST".equals(request)) throw new MalformedURLException("Cannot create consumer source
for request that is not POST.");
+		return new ServletServiceConsumerSource(request);
 	}
 
 	public void release(Source source) {



Mime
View raw message