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

Provide support for unconnected sockets

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 4.0 Alpha 1
    • HttpClient (classic)
    • None
    • Operating System: All
      Platform: PC
    • 35383

    Description

      Overview description:
      If Proxy settings are incorrect or host does not reply, the
      HttpClient.executeMethod() hangs, and HttpMethod.abort() does not stop it. Thus,
      you cannot assert that the entire application will stop immediately on demand.

      Expected Results:
      During a HttpMethod.executeMethod(), HttpMethod.abort() should cancel
      immediately the executeMethod().

      Actual Results:
      If HttpMethod.executeMethod() freezes because of Proxy bad settings or not
      responding hostname (in fact impossible to open the socket), the abort() method
      does not do anything.

      Platform:
      I tested it on Windows XP and Linux Debian with HttpClient 3.0 RC2 (but if you
      look further I point the problem and the source code of the nightly build is
      identical).

      See comments for the dialogue about the problem, and 2 Test cases. The solution
      is described at the end, but it may implies a change in the API and works only
      since Java 1.4.

      Attachments

        1. 2k6-12-27-socketfactory-1.txt
          14 kB
          Roland Weber
        2. ASF.LICENSE.NOT.GRANTED--ConnectTest.java
          1 kB
          Benjamin Chevillon
        3. ASF.LICENSE.NOT.GRANTED--ConnectTest.log
          0.6 kB
          Benjamin Chevillon
        4. ASF.LICENSE.NOT.GRANTED--MethodAbortTest.java
          3 kB
          Benjamin Chevillon
        5. ASF.LICENSE.NOT.GRANTED--MethodAbortTestWithoutProxy.log
          5 kB
          Benjamin Chevillon
        6. ASF.LICENSE.NOT.GRANTED--MethodAbortTestWithProxy.log
          6 kB
          Benjamin Chevillon

        Issue Links

          Activity

            People

              rolandw Roland Weber
              bchevill.ml@gmail.com Benjamin Chevillon
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: