ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r492012 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java
Date Wed, 03 Jan 2007 02:20:07 GMT
Author: dims
Date: Tue Jan  2 18:20:06 2007
New Revision: 492012

URL: http://svn.apache.org/viewvc?view=rev&rev=492012
Log:
port part of 491613 - minimize calls to getContentType

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java?view=diff&rev=492012&r1=492011&r2=492012
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java
Tue Jan  2 18:20:06 2007
@@ -228,7 +228,8 @@
         MessageContext msgContext;
         OutputStream out = res.getOutputStream();
 
-        if (!disableREST && enableRESTInAxis2MainServlet && isRESTRequest(req))
{
+        String contentType = req.getContentType();
+        if (!disableREST && enableRESTInAxis2MainServlet && isRESTRequest(contentType,
req)) {
             msgContext = createMessageContext(req, res);
             try {
                 new RESTUtil(configContext).processPostRequest(msgContext,
@@ -249,7 +250,7 @@
             try {
                 // adding ServletContext into msgContext;
                 InvocationResponse pi = HTTPTransportUtils.processHTTPPostRequest(msgContext,
req.getInputStream(), out,
-                        req.getContentType(), req.getHeader(HTTPConstants.HEADER_SOAP_ACTION),
+                        contentType, req.getHeader(HTTPConstants.HEADER_SOAP_ACTION),
                         req.getRequestURL().toString());
 
                 if (pi.equals(InvocationResponse.SUSPEND))
@@ -540,8 +541,7 @@
      *
      * @param request
      */
-    private boolean isRESTRequest(HttpServletRequest request) {
-        String contentType = request.getContentType();
+    private boolean isRESTRequest(String contentType, HttpServletRequest request) {
         String soapActionHeader = request.getHeader(HTTPConstants.HEADER_SOAP_ACTION);
 //possible bug.. 
         return ((soapActionHeader == null) ||



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message