8203850: java.net.http HTTP client should allow specifying Origin and Referer headers

Reviewed-by: chegar, dfuchs
This commit is contained in:
Michael McMahon 2018-10-12 11:12:51 +01:00
parent 55692eb0ca
commit 96b43418b5
3 changed files with 82 additions and 10 deletions

View file

@ -133,9 +133,7 @@ public final class Utils {
// A case insensitive TreeSet of strings.
TreeSet<String> treeSet = new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
treeSet.addAll(Set.of("connection", "content-length",
"date", "expect", "from", "host", "origin",
"referer", "upgrade",
"via", "warning"));
"date", "expect", "from", "host", "upgrade", "via", "warning"));
DISALLOWED_HEADERS_SET = Collections.unmodifiableSet(treeSet);
}