Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8822

AsyncHTTPConduit removes query-parameters when path is empty

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.5.5
    • 3.6.0, 4.0.1, 3.5.6, 3.4.11
    • Transports
    • None
    • Unknown

    Description

      AsyncHTTPConduit.setupConnection(Message message, Address address, HTTPClientPolicy csPolicy) performs some URI-cleanup which results in query-parameters being removed when the path-part of the URI is empty.

          @Test
          public void testEmptyPathWithQueryParams() throws IOException {
              String address = "http://localhost?param1=value1&param2=value2";
              Greeter greeter = new SOAPService().getSoapPort();
              setAddress(greeter, address);
              HTTPConduit c = (HTTPConduit)((ClientProxy) Proxy.getInvocationHandler(greeter)).getClient().getConduit();
              MessageImpl message = new MessageImpl();
              message.put(USE_ASYNC, true);
              ExchangeImpl exchange = new ExchangeImpl();
              message.setExchange(exchange);
              c.prepare(message);
              CXFHttpRequest e = message.get(CXFHttpRequest.class);
              assertEquals(address, e.getUri().toString()); // query-parameters gone
          }
      

      Attachments

        Issue Links

          Activity

            People

              reta Andriy Redko
              maghol Magnus Holm
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: