Skip to content

Commit 52f9ba4

Browse files
committed
document last additions from Lai Quang Duong
1 parent 240506e commit 52f9ba4

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/changes/changes.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88

99
<body>
1010
<release version="5.0.0" date="April 01, 2026" description="jdk17, Bugfixes">
11+
<action type="fix" dev="Lai Quang Duong">
12+
Correcting CORS preflight handling by properly recognize the wildcard '*' value for the Access-Control-Allow-Headers response header.
13+
</action>
1114
<action type="add" dev="Lai Quang Duong">
1215
Intl: supportedLocalesOf() implementation added to DateTimeFormat and NumberFormat.
1316
</action>

src/main/java/org/htmlunit/javascript/host/xml/XMLHttpRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ private boolean isPreflightAuthorized(final WebResponse preflightResponse) {
11331133
if (HttpHeader.ACCESS_CONTROL_ALLOW_HEADERS.equalsIgnoreCase(pair.getName())) {
11341134
String value = pair.getValue();
11351135
if (value != null) {
1136-
if ("*".equals(value)) {
1136+
if (ALLOW_ORIGIN_ALL.equals(value)) {
11371137
// all headers are allowed
11381138
return true;
11391139
}

src/test/java/org/htmlunit/javascript/host/xml/XMLHttpRequestCORSTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
* @author Marc Guillemot
4646
* @author Ronald Brill
4747
* @author Frank Danek
48+
* @author Lai Quang Duong
4849
*/
4950
public class XMLHttpRequestCORSTest extends WebDriverTestCase {
5051

0 commit comments

Comments
 (0)