Javadoc for com/sun/net/httpserver/HttpExchange.java#setAttribute and com/sun/net/httpserver/HttpExchange.java#getAttribute should make it clear that attributes are not per-exchange but are shared for exchanges on the same HttpContext. The current description can be misunderstood:
https://hg.openjdk.java.net/jdk/jdk/file/a4fb32538898/src/jdk.httpserver/share/classes/com/sun/net/httpserver/HttpExchange.java#l219
"Filter modules may store arbitrary objects with HttpExchange instances as an out-of-band communication mechanism."
See also https://mail.openjdk.java.net/pipermail/net-dev/2019-December/013420.html
See also https://stackoverflow.com/questions/59178977/are-com-sun-net-httpserver-httpexchange-attributes-broken
FREQUENCY : always
- csr for
-
JDK-8345243 Javadoc for com/sun/net/httpserver/HttpExchange.java#setAttribute is unclear
-
- Closed
-
- duplicates
-
JDK-7105350 HttpExchange's attributes are the same as HttpContext's attributes
-
- Closed
-
-
JDK-8345233 jdk.httpserver HttpExchange attributes are shared across requests
-
- Closed
-
- relates to
-
JDK-8345577 Additional clarification to the com.sun.net.httpserver.HttpExchange.getAttribute() and setAttribute() methods after JDK-8235786
-
- Closed
-
-
JDK-8345794 Backout doc change introduced by JDK-8235786
-
- Resolved
-
-
JDK-8345796 Backout doc change introduced by JDK-8235786
-
- Closed
-
- links to
-
Commit(master) openjdk/jdk/40ae4699
-
Review(master) openjdk/jdk/22454