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

URLConnection.getRequestProperties throws after connect

XMLWordPrintable

    • generic
    • generic

      FULL PRODUCT VERSION :
      8-131

      ADDITIONAL OS VERSION INFORMATION :
      windows 10 64-bit

      A DESCRIPTION OF THE PROBLEM :
      HttpsURLConnection.getRequestProperties throws after connect. The member variable connected is set to true after connect and cannot be set to false again, in order to read the requestproperty. setRequestProperty might be throwable after connect, but it should be possible to read them at any time. This is a tiny fix....



      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      create HttpsURLConnection and connect, then try to getRequestProperties


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      be able to read properties (READ , not set)
      ACTUAL -
      throws exception

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Use apache libraries instead of core java....

            michaelm Michael McMahon
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: