HttpResponse.body() returns null with https target and failed proxy authentication

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P3
    • tbd
    • Affects Version/s: 11
    • Component/s: core-libs
    • None
    • generic
    • generic

      Attempt a java.net.http client GET to an HTTPS target using a proxy which requires authentication.

      HttpResponse.statusCode() returns 407 but HttpResponse.body() returns null.
      Works as expected with http:// target.

      Since it works correctly with http:// target this seems like a bug and not a documentation gap. It would be onerous to test the result of body() for null every time.

      Have seen issue with BodyHandlers.ofString() and BodyHandlers.ofInputStream()

            Assignee:
            Jaikiran Pai
            Reporter:
            Richard Evans
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: