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

You can getOutputStream from an HTTP URL connection even if doOutput is false

XMLWordPrintable

    • 1.1
    • generic, sparc
    • generic, solaris_2.4
    • Not verified

      URLConnections for HTTP URLs allows getOutputStream to return a stream, ignoring
      doOutput. That is, if doOutput is false, you will still get a stream back from getOutputStream

      The description field as copied from bug report 1262772 follows:

      The URLConnection implementaiton for HTTP URLs doesn't check the doOutput
      flag before returning an output stream from getOutputStream. This lets one get
      a connection on which output should not be done.

      The description field as copied from bug report 1262574 follows:

      I can get an output stream from an HTTP URL connection even if doOutput is false

      This is the root of our belief that Netscape "doesn't allow POST". It does, but they
      reasonably require that doOutput be true before the will return an output stream
      to a URL. We ignore the flag. We shouldn't.

            busersunw Btplusnull User (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: