Uploaded image for project: 'WS-Commons'
  1. WS-Commons
  2. WSCOMMONS-405

Transport: In some cases HTTP GET on services is not handled correctly in HTTPWorker.java

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      In some cases HTTP GET on services is not handled correctly in HTTPWorker. Instead of calling the service code a list of deployed services is returned instead. That happens if the request uri does not have "?" in it.

      One quick solution for this problem is to remove the following code block from HTTPWorker.java:

      Index: modules/http/src/org/apache/axis2/transport/http/HTTPWorker.java
      ===================================================================
      — modules/http/src/org/apache/axis2/transport/http/HTTPWorker.java (revision 722613)
      +++ modules/http/src/org/apache/axis2/transport/http/HTTPWorker.java (working copy)
      @@ -111,17 +111,6 @@
      }
      }
      }

      • } else {
      • String serviceName = uri.replaceAll(contextPath, "");
      • if (serviceName.indexOf("/") < 0) { - String s = HTTPTransportReceiver - .printServiceHTML(serviceName, configurationContext); - response.setStatus(HttpStatus.SC_OK); - response.setContentType("text/html"); - OutputStream out = response.getOutputStream(); - out.write(EncodingUtils.getBytes(s, HTTP.ISO_8859_1)); - return; - }

        }
        }
        }

      Attachments

        1. WSCOMMONS-405.patch
          1 kB
          Jarek Gawor

        Issue Links

          Activity

            People

              gawor@mcs.anl.gov Jarek Gawor
              gawor@mcs.anl.gov Jarek Gawor
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: