Uploaded image for project: 'XML-RPC'
  1. XML-RPC
  2. XMLRPC-84

enableForExtension Servlet parameter ignored

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 3.0a1
    • Fix Version/s: None
    • Component/s: Source
    • Labels:
      None
    • Environment:
      Tomcat 5.5.17, Windows XP SP2, Java 1.5.0_06

      Description

      When using the "enabledForExtensions" parameter for the XmlRpcServlet, the parameter seems to be ignored, and all requests involving extensions report an error.

      By changing the Servlet "init" method as follow, the behaviour is as expected (i.e. if value is set to true, extensions can used):

      public void init(ServletConfig pConfig) throws ServletException {
      super.init(pConfig);
      try {
      server = newXmlRpcServer(pConfig);
      server.setHandlerMapping(newXmlRpcHandlerMapping());
      String enabledForExtensionsParam = pConfig.getInitParameter("enabledForExtensions");
      if( ( enabledForExtensionsParam != null ) && ( enabledForExtensionsParam.equals( "true" ) ) )

      { ( (XmlRpcServerConfigImpl)server.getConfig() ).setEnabledForExtensions( true ); }

      else

      { ( (XmlRpcServerConfigImpl)server.getConfig() ).setEnabledForExtensions( false ); }

      } catch (XmlRpcException e) {
      try

      { log("Failed to create XmlRpcServer: " + e.getMessage(), e); }

      catch (Throwable ignore) {
      }
      throw new ServletException(e);
      }
      }

      It only consists in looking up the ServletConfig for the parameter. As I couldn't find any other reference to it in the code, I guess this is a bug. Though not being very familiar with this project I might have overlooked something.

      Regards,
      Denis Carniel

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dcarniel Denis Carniel
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: