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

HttpRetryException should be specified for getInputStream()

XMLWordPrintable

    • generic
    • generic



      Name: vpR10197 Date: 05/27/2004


      The specification for the HttpURLConnection.setChunkedStreamingMode() and
      HttpURLConnection.getFixedLengthStreamingMode() methods says:

          When output streaming is enabled, authentication and
          redirection cannot be handled automatically. A HttpRetryException
          will be thrown when reading the response if authentication or
          redirection are required

      Inspite of the spec of getInputStream() passes over this exception in sielence,
      it could be interpreted like this:

          ....A HttpRetryException will be thrown during first invocation
          of getInputStream() if...
      (note: this phrase does not pretend to be a part of specification, it is
      just an example)

      Indeed, HttpRetryException is thrown on client side during getting an
      input stream and tests should consider that as an expected behaviour.
      Perhaps, this behaviour should be more precisely described, at least
      HttpRetryException must be mentioned in the exceptions list thrown
      by getInputStream.

      One more inaccuracy: <jdk_doc>/api/java/net/class-use/HttpRetryException.html
      shows the 'No usage of java.net.HttpRetryException' message that does not
      correspond to the implementation.
      ======================================================================

            chegar Chris Hegarty
            vitpsunw Vitp Vitp (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: