You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2025/02/14 14:31:46 UTC
(tomcat) branch 11.0.x updated: Minor simplification
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push:
new 943bfc7257 Minor simplification
943bfc7257 is described below
commit 943bfc7257bbf3332897978c2552bd071e722b07
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Feb 14 14:31:03 2025 +0000
Minor simplification
---
java/org/apache/catalina/filters/CorsFilter.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/java/org/apache/catalina/filters/CorsFilter.java b/java/org/apache/catalina/filters/CorsFilter.java
index 7363aa9f62..77f0a3a6f8 100644
--- a/java/org/apache/catalina/filters/CorsFilter.java
+++ b/java/org/apache/catalina/filters/CorsFilter.java
@@ -558,10 +558,10 @@ public class CorsFilter extends GenericFilter {
if ("OPTIONS".equals(method)) {
String accessControlRequestMethodHeader = request.getHeader(REQUEST_HEADER_ACCESS_CONTROL_REQUEST_METHOD);
if (accessControlRequestMethodHeader != null) {
- if (!accessControlRequestMethodHeader.isEmpty()) {
- return CORSRequestType.PRE_FLIGHT;
+ if (accessControlRequestMethodHeader.isEmpty()) {
+ return CORSRequestType.INVALID_CORS;
}
- return CORSRequestType.INVALID_CORS;
+ return CORSRequestType.PRE_FLIGHT;
}
return CORSRequestType.ACTUAL;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org