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

Improve HttpExchange.sendResponseHeaders usability

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • core-libs
    • None

      The allowed values for the length parameter of HttpExchange.sendResponseHeaders are quite counter-intuitive and prone to error. Specifically, a value `0` means that chunked encoding is used rather than the expected empty response body. Whereas `-1` signifies an empty response.

      We can't change the values, but usability could be improved by defining symbolic constants and referring to these constant names rather than the numerics in apidoc.

            michaelm Michael McMahon
            michaelm Michael McMahon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: