Polish contribution

See gh-36777
This commit is contained in:
Sam Brannen
2026-05-20 17:45:15 +02:00
parent 4bb20ea8db
commit 1e843fd3ec
2 changed files with 5 additions and 2 deletions
@@ -79,10 +79,12 @@ public abstract class ExchangeFilterFunctions {
* Return a filter that applies HTTP Basic Authentication to the request
* headers via {@link HttpHeaders#setBasicAuth(String)} and
* {@link HttpHeaders#encodeBasicAuth(String, String, Charset)}.
* <p>{@linkplain StandardCharsets#ISO_8859_1 ISO-8859-1} is used to convert the credentials into an octet sequence.
* <p>{@linkplain StandardCharsets#ISO_8859_1 ISO-8859-1} is used to convert
* the credentials into an octet sequence.
* @param username the username
* @param password the password
* @return the filter to add authentication headers with
* @see #basicAuthentication(String, String, Charset)
* @see HttpHeaders#encodeBasicAuth(String, String, Charset)
* @see HttpHeaders#setBasicAuth(String)
*/
@@ -100,6 +102,7 @@ public abstract class ExchangeFilterFunctions {
* sequence. Defaults to {@linkplain StandardCharsets#ISO_8859_1 ISO-8859-1}.
* @return the filter to add authentication headers with
* @since 7.0.8
* @see #basicAuthentication(String, String)
* @see HttpHeaders#encodeBasicAuth(String, String, Charset)
* @see HttpHeaders#setBasicAuth(String)
*/
@@ -115,7 +115,7 @@ class ExchangeFilterFunctionsTests {
assertThat(result).isEqualTo(response);
}
@Test
@Test // gh-36777
void basicAuthenticationUsernameAndUnicodePassword() {
ClientRequest request = ClientRequest.create(HttpMethod.GET, DEFAULT_URL).build();
ClientResponse response = mock();