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

enableForExtension Servlet parameter ignored

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.0a1
    • None
    • Source
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: