mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-09 14:34:43 +00:00
Test: fix build failure where randomly a restricted header was used.
Original commit: elastic/x-pack-elasticsearch@c3892181ab
This commit is contained in:
parent
b11f457fb7
commit
1db5d1e37d
@ -83,7 +83,9 @@ public class HttpClientTest extends ElasticsearchTestCase {
|
||||
String paramValue = randomAsciiOfLength(3);
|
||||
requestBuilder.setParam(paramKey, paramValue);
|
||||
|
||||
String headerKey = randomAsciiOfLength(3);
|
||||
// Certain headers keys like via and host are illegal and the jdk http client ignores those, so lets
|
||||
// prepend all keys with `_`, so we don't run into a failure because randomly a restricted header was used:
|
||||
String headerKey = "_" + randomAsciiOfLength(3);
|
||||
String headerValue = randomAsciiOfLength(3);
|
||||
requestBuilder.setHeader(headerKey, headerValue);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user