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

Http keep-alive implementation is not efficient

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.4.1, 5.0
    • Fix Version/s: 6
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      beta
    • CPU:
      generic, x86
    • OS:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: