git: openjdk/jdk11u-dev: 8232625: HttpClient redirect policy should be more conservative

Andrew John Hughes andrew at openjdk.org
Thu May 8 22:06:04 UTC 2025


Changeset: bfc3bebd
Branch: master
Author:    Antonio Vieiro <avieirov at redhat.com>
Committer: Andrew John Hughes <andrew at openjdk.org>
Date:      2025-05-08 22:03:06 +0000
URL:       https://git.openjdk.org/jdk11u-dev/commit/bfc3bebd26fa21716ac6461a016bda5548486978

8232625: HttpClient redirect policy should be more conservative

When enabled, HttpClient redirect is fixed to drop the body when the request method is changed, and to relay any redirection code it does not understand to the caller.

Reviewed-by: andrew
Backport-of: b3477399d01c81dfe87e2041926a0244e616c18f

! src/java.net.http/share/classes/jdk/internal/net/http/HttpRequestImpl.java
! src/java.net.http/share/classes/jdk/internal/net/http/RedirectFilter.java
+ test/jdk/java/net/httpclient/HttpRedirectTest.java
! test/jdk/java/net/httpclient/http2/RedirectTest.java
! test/jdk/java/net/httpclient/http2/server/Http2RedirectHandler.java



More information about the jdk-updates-changes mailing list