Details

    • Type: Enhancement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2.0.0.Beta1, 1.4.17.Final
    • Component/s: None
    • Labels:
      None

      Description

      According to RFC2732 , section 2. Literal IPv6 Address Format in URL's Syntax and HTTP header field definition specification, correct host name and request URL should be enclosed like following one: http://[fe80::56ee:75ff:fe47:c83e].

      In case the Undertow is configured as a static loadbalancer using reverse proxy and client creates request with incorrectly enclosed host name (i.e request for http://fe80::56ee:75ff:fe47:c83e) parsing of address fails with following exception the log.

      10:36:20,823 ERROR [org.xnio.listener] (default I/O-4) XNIO001007: A channel event listener threw an exception: java.lang.NumberFormatException: For input string: ":56ee:75ff:fe47:c83e"
      	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      	at java.lang.Integer.parseInt(Integer.java:580)
      	at java.lang.Integer.parseInt(Integer.java:615)
      	at io.undertow.server.HttpServerExchange.getHostPort(HttpServerExchange.java:658)
      	at io.undertow.server.handlers.proxy.ProxyHandler$ProxyAction.run(ProxyHandler.java:489)
      	at io.undertow.util.SameThreadExecutor.execute(SameThreadExecutor.java:35)
      	at io.undertow.server.HttpServerExchange.dispatch(HttpServerExchange.java:794)
      	at io.undertow.server.handlers.proxy.ProxyHandler$ProxyClientHandler.completed(ProxyHandler.java:293)
      	at io.undertow.server.handlers.proxy.ProxyHandler$ProxyClientHandler.completed(ProxyHandler.java:267)
      	at io.undertow.server.handlers.proxy.LoadBalancingProxyClient$2.completed(LoadBalancingProxyClient.java:281)
      	at io.undertow.server.handlers.proxy.LoadBalancingProxyClient$2.completed(LoadBalancingProxyClient.java:259)
      	at io.undertow.server.handlers.proxy.ProxyConnectionPool.connectionReady(ProxyConnectionPool.java:330)
      	at io.undertow.server.handlers.proxy.ProxyConnectionPool.access$900(ProxyConnectionPool.java:58)
      	at io.undertow.server.handlers.proxy.ProxyConnectionPool$1.completed(ProxyConnectionPool.java:278)
      	at io.undertow.server.handlers.proxy.ProxyConnectionPool$1.completed(ProxyConnectionPool.java:265)
      	at io.undertow.client.http.HttpClientProvider.handleConnected(HttpClientProvider.java:156)
      	at io.undertow.client.http.HttpClientProvider.access$000(HttpClientProvider.java:51)
      	at io.undertow.client.http.HttpClientProvider$2.handleEvent(HttpClientProvider.java:127)
      	at io.undertow.client.http.HttpClientProvider$2.handleEvent(HttpClientProvider.java:124)
      	at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
      	at org.xnio.nio.WorkerThread$ConnectHandle.handleReady(WorkerThread.java:326)
      	at org.xnio.nio.WorkerThread.run(WorkerThread.java:567)
      
      

      This happens because enclosed host name is expected.
      Correct format of IPv6 address should be checked and more informative exception should be thrown.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  swd847 Stuart Douglas
                  Reporter:
                  swd847 Stuart Douglas
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: