8163921: HttpURLConnection default Accept header is malformed according to HTTP/1.1 RFC

Reviewed-by: dfuchs, michaelm
This commit is contained in:
Daniel Jeliński 2022-01-25 11:10:51 +00:00 committed by Michael McMahon
parent c43ce85f01
commit 28796cbd1d
2 changed files with 10 additions and 11 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -288,8 +288,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
}
static final String httpVersion = "HTTP/1.1";
static final String acceptString =
"text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2";
static final String acceptString = "*/*";
// the following http request headers should NOT have their values
// returned for security reasons.