RFR: 7105350: HttpExchange's attributes are the same as HttpContext's attributes [v2]

Daniel Fuchs dfuchs at openjdk.org
Wed Oct 8 13:04:59 UTC 2025


On Wed, 8 Oct 2025 10:09:16 GMT, Michael McMahon <michaelm at openjdk.org> wrote:

>> I can switch to `sun.net.NetProperties` if you so desire.
>
> Yeah, I think we should put the property in `net.properties` something like this:
> 
> 
>   # Prior to JDK 26, the HttpExchange attribute map was shared with the enclosing HttpContext.
>   # Since JDK 26, by default, exchange attributes are per-exchange and the context attributes must
>   # be accessed by calling getHttpContext().getAttributes(). Uncomment this property to
>   # restore the pre JDK 26 behavior.
>   #
>   # jdk.httpserver.attributes=context
> 
> Then I think we should add a sentence at the end of the jdk.httpserver module-info to say that additional
> system/networking properties may be defined in `net.properties`

That proposal sounds good to me. Documenting the compatibiity in net.properties makes sense.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27652#discussion_r2413763085


More information about the net-dev mailing list