Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-3116

NettyClient sends uri on absolute format which is not correct according to RFC2616

    XMLWordPrintable

Details

    Description

      When JBossWS native implementation sends a HTTP request this is hadled by org.jboss.ws.core.client.transport.NettyClient. The first line in the HTTP request is sent like this:

      POST http://server:port/path HTTP/1.1

      I.e. an absoluteURI according to section 5.1.2 in RFC2616. However, there it's also stated that:

      The most common form of Request-URI is that used to identify a
      resource on an origin server or gateway. In this case the absolute
      path of the URI MUST be transmitted (see section 3.2.1, abs_path) as
      the Request-URI, and the network location of the URI (authority) MUST
      be transmitted in a Host header field. For example, a client wishing
      to retrieve the resource above directly from the origin server would
      create a TCP connection to port 80 of the host "www.w3.org" and send
      the lines:

      GET /pub/WWW/TheProject.html HTTP/1.1
      Host: www.w3.org

      The absoluteURI format is to be used when the request is sent through a proxy and the abs_path format is to be used when sending directly to the server. Although RFC2616 also states that all servers compliant to HTTP 1.1 must be able to accept the absoluteURI for forward compatibility, no compliant clients must generate such requests.

      I found this when I ran into problems connecting to a certain webservice which couldn't parse the uri, so in that case both sides were wrong (jbossws shouldn't use that kind of uri and the other end should be able to accept them).

      To make JBossWS compliant to HTTP 1.1 I've changed it according to the attached patch, it probably need some more work as it needs to check if proxy is used and if so send the uri on absolute format.

      Attachments

        Activity

          People

            sergeyb_jira Sergey Beryozkin (Inactive)
            sverker_jira Sverker Abrahamsson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: