Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5045306

Http keep-alive implementation is not efficient

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 6
    • 1.4.1, 5.0
    • core-libs
    • beta
    • generic, x86
    • generic, windows_xp

    Description

      Current http keep-alive implementation requires user code to clean up pending data before it can be reused. it is too much burden on programmers.

      Also see #5039967


      ###@###.### 2004-05-11

      Cut & paste from email discussions about the root cause for 5039967:

      Zhengyu Gu wrote:

      "When plugin download jars, it wraps input stream with JarInputStream, even plugin iterators all jar etnries and reads all entry content, it seems that input stream is still not clean. The solution is to empty the input stream if iterating jar entries.

      I realized that your fix was not enough for plugin, I was hoping that networking code could provide simple call to cleanup the channel. For example, if user code call InputStream.close() && keep-alive is on, then close() call should put into pool, and when the connection is retrieved from the pool, cleanup code will be executed to clean up the pending data and connection become resuable."

      Attachments

        Issue Links

          Activity

            People

              chegar Chris Hegarty
              zgu Zhengyu Gu
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: