abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r569474 - /incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractRequestHandler.java
Date Fri, 24 Aug 2007 18:27:15 GMT
Author: jmsnell
Date: Fri Aug 24 11:27:15 2007
New Revision: 569474

URL: http://svn.apache.org/viewvc?rev=569474&view=rev
Log:
Apply Brian Moseley's head response patch.

Modified:
    incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractRequestHandler.java

Modified: incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractRequestHandler.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractRequestHandler.java?rev=569474&r1=569473&r2=569474&view=diff
==============================================================================
--- incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractRequestHandler.java
(original)
+++ incubator/abdera/java/trunk/server/src/main/java/org/apache/abdera/protocol/server/impl/AbstractRequestHandler.java
Fri Aug 24 11:27:15 2007
@@ -55,12 +55,12 @@
     log.debug(Messages.format("USING.PROVIDER",provider));
     try {
       if (preconditions(provider, request, response)) {
-        output(response,provider.request(request));
+        output(request, response,provider.request(request));
       }
     } catch (Throwable e) {
       log.error(Messages.get("OUTPUT.ERROR"), e);
       try {
-        output(response,new EmptyResponseContext(500));
+        output(request,response,new EmptyResponseContext(500));
       } catch (Exception ex) {
         log.error(Messages.get("OUTPUT.ERROR"), ex);
         response.sendError(500);
@@ -99,6 +99,7 @@
   }
   
   protected void output(
+    RequestContext request,
     HttpServletResponse response, 
     ResponseContext context) 
       throws IOException, ServletException {
@@ -126,7 +127,7 @@
           }
         }
       }  
-      if (context.hasEntity()) {
+      if (!request.getMethod().equals("HEAD") && context.hasEntity()) {
         OutputStream out = response.getOutputStream();
         context.writeTo(out);
         out.close();



Mime
View raw message