|
1 | 1 | /* |
2 | | - * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2019, 2024, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * This code is free software; you can redistribute it and/or modify it |
|
23 | 23 |
|
24 | 24 | /** |
25 | 25 | * @test |
26 | | - * @bug 8185898 8163921 |
| 26 | + * @bug 8185898 8163921 8339470 |
27 | 27 | * @modules java.base/sun.net.www |
28 | 28 | * @library /test/lib |
29 | 29 | * @run main/othervm B8185898 |
@@ -143,32 +143,32 @@ static void testMessageHeaderMethods() throws IOException { |
143 | 143 | // {{inputString1, expectedToString1, expectedPrint1}, {...}} |
144 | 144 | String[][] strings = { |
145 | 145 | {"HTTP/1.1 200 OK\r\n" |
146 | | - + "Accept: */*\r\n" |
| 146 | + + "Accept: text/html, image/gif, image/jpeg, */*; q=0.2\r\n" |
147 | 147 | + "Connection: keep-alive\r\n" |
148 | 148 | + "Host: 127.0.0.1:12345\r\n" |
149 | 149 | + "User-agent: Java/12\r\n\r\nfoooo", |
150 | 150 | "pairs: {null: HTTP/1.1 200 OK}" |
151 | | - + "{Accept: */*}" |
| 151 | + + "{Accept: text/html, image/gif, image/jpeg, */*; q=0.2}" |
152 | 152 | + "{Connection: keep-alive}" |
153 | 153 | + "{Host: 127.0.0.1:12345}" |
154 | 154 | + "{User-agent: Java/12}", |
155 | | - "Accept: */*\r\n" |
| 155 | + "Accept: text/html, image/gif, image/jpeg, */*; q=0.2\r\n" |
156 | 156 | + "Connection: keep-alive\r\n" |
157 | 157 | + "Host: 127.0.0.1:12345\r\n" |
158 | 158 | + "User-agent: Java/12\r\n\r\n"}, |
159 | 159 | {"HTTP/1.1 200 OK\r\n" |
160 | | - + "Accept: */*\r\n" |
| 160 | + + "Accept: text/html, image/gif, image/jpeg, */*; q=0.2\r\n" |
161 | 161 | + "Connection: keep-alive\r\n" |
162 | 162 | + "Host: 127.0.0.1:12345\r\n" |
163 | 163 | + "User-agent: Java/12\r\n" |
164 | 164 | + "X-Header:\r\n\r\n", |
165 | 165 | "pairs: {null: HTTP/1.1 200 OK}" |
166 | | - + "{Accept: */*}" |
| 166 | + + "{Accept: text/html, image/gif, image/jpeg, */*; q=0.2}" |
167 | 167 | + "{Connection: keep-alive}" |
168 | 168 | + "{Host: 127.0.0.1:12345}" |
169 | 169 | + "{User-agent: Java/12}" |
170 | 170 | + "{X-Header: }", |
171 | | - "Accept: */*\r\n" |
| 171 | + "Accept: text/html, image/gif, image/jpeg, */*; q=0.2\r\n" |
172 | 172 | + "Connection: keep-alive\r\n" |
173 | 173 | + "Host: 127.0.0.1:12345\r\n" |
174 | 174 | + "User-agent: Java/12\r\n" |
|
0 commit comments