Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1710

OSGiRoutePlanner examines only the first proxy exception and also crashes processing IP address exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.4.1, 4.5, 5.0
    • 5.0 Alpha1
    • HttpClient (classic)
    • None
    • OSGi

    Description

      The HttpClientBuilderFactory and internal RoutePlanner objects are a fantastic addition since 4.3.

      There are couple minor bugs rendering them unusable at the moment though.

      1. The OSGiRoutePlanner.determinProxy() method only examines the first proxy exception.

      2. When OSGiRoutePlanner.determinProxy() is creating a NetworkAddress from a String IP address, it refers to the 6th capture group in a case where there are only four, leading to an out of bounds exception.

      The class file is attached containing fixes for both issues at the 4.4.1 version. I checked and found both issues existing in the trunk (5.0) at the time of this writing.

      Attachments

        1. TestOSGiHttpRoutePlanner.java
          6 kB
          munene kiruja
        2. OSGiHttpRoutePlanner.java
          7 kB
          munene kiruja

        Issue Links

          Activity

            People

              Unassigned Unassigned
              munene.kiruja munene kiruja
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: