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

getInputStream on URLConnection doesn't return until complete response arrives

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0, 1.3.1
    • core-libs
    • beta
    • generic, x86
    • generic, windows_98, windows_nt, windows_2000



      Name: skT45625 Date: 04/27/2000


      java version "1.3.0rc3"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0rc3-Z)
      Java HotSpot(TM) Client VM (build 1.3.0rc3-Z, mixed mode)

      My applet needs to communicate to the web server. The communication
      is implemented via URLConnection relative to the document base.
      The responce to the request has extended lifecycle (something analogous
      to HTTP media streaming, i.e. the data arrives in chunks in the body
      of response).

      The problem is, getInputStream in 1.3 doesn't seem to return until
      the response is finished (socket dropped on the server side.)

      All Java VMs prior to 1.3 and old browsers (except NS6 which uses 1.3)
      seem to work fine.

      Live example available at http://demo.c.uroam.com/delaytest/index.htm
      the applet source at http://demo.c.uroam.com/delaytest/MainApplet.java
      the Apache module generating data at
      http://demo.c.uroam.com/delaytest/test_module.cpp

      The example url first spits out around 3K of text to exclude buffering as
      the explanation for the problem, then generates a line every 4 sec 10 times.
      (Review ID: 103808)
      ======================================================================
      additional information:

      Just as a new input: this bug shows up only when the Content-Length
      header in the reply is not set.
      But, as this is not a "must have" header, it's still a bug.

      Thanks a lot!
      Igor

      suresh.kondamareddy@eng 2000-04-27

            alanb Alan Bateman
            skondamasunw Suresh Kondamareddy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: