You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2014/11/03 23:53:58 UTC
[Bug 57180] New: CorsFilter does not support PATCH method
https://issues.apache.org/bugzilla/show_bug.cgi?id=57180
Bug ID: 57180
Summary: CorsFilter does not support PATCH method
Product: Tomcat 7
Version: 7.0.56
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: dev@tomcat.apache.org
Reporter: frank.kline@gmail.com
The CorsFilter provided with Tomcat 7 should support the PATCH method.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 57180] CorsFilter does not support PATCH method
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57180
Frank Kline <fr...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |---
--- Comment #5 from Frank Kline <fr...@gmail.com> ---
Seems like this is still broken in 8.0.18. The check for a valid cors method is
gated by a check against HTTP_METHODS, which doesn't include PATCH.
Note there is an additional spec for the addition of PATCH:
http://tools.ietf.org/html/rfc5789
/**
* {@link Collection} of HTTP methods. Case sensitive.
*
* @see <a href="http://tools.ietf.org/html/rfc2616#section-5.1.1"
* >http://tools.ietf.org/html/rfc2616#section-5.1.1</a>
*
*/
public static final Collection<String> HTTP_METHODS =
new HashSet<>(Arrays.asList("OPTIONS", "GET", "HEAD", "POST",
"PUT",
"DELETE", "TRACE", "CONNECT"));
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 57180] CorsFilter does not support PATCH method
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57180
Christopher Schultz <ch...@christopherschultz.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #1 from Christopher Schultz <ch...@christopherschultz.net> ---
Bugzilla is not a support forum. If you need help, please post to the user's
mailing list.
Hint: you can set the "cors.allowed.methods" init-param for the CorsFilter and
allow whatever HTTP methods you want. By default, the filter supports
GET,POST,HEAD,OPTIONS but you can add whatever you want to that list.
http://tomcat.apache.org/tomcat-7.0-doc/config/filter.html#CORS_Filter
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 57180] CorsFilter does not support PATCH method
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57180
Frank Kline <fr...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |frank.kline@gmail.com
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 57180] CorsFilter does not support PATCH method
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57180
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Mark Thomas <ma...@apache.org> ---
I have removed the check against complex methods.
This has been fixed in trunk 8.0.x (for 8.0.16 onwards) and 7.0.x (for 7.0.58
onwards).
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 57180] CorsFilter does not support PATCH method
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57180
--- Comment #4 from Frank Kline <fr...@gmail.com> ---
Fantastic! Thanks, Mark.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 57180] CorsFilter does not support PATCH method
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57180
Frank Kline <fr...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|INVALID |---
--- Comment #2 from Frank Kline <fr...@gmail.com> ---
This isn't a help request; it's a bug report.
Irrespective of allowed methods, the preflight filter evaluates the following:
"if (method != null && HTTP_METHODS.contains(method)) {" as well as "else if
(COMPLEX_HTTP_METHODS.contains(method)) {"
Neither HTTP_METHODS nor COMPLEX_HTTP_METHODS contain "PATCH" hence, the
original definition of "CORSRequestType requestType =
CORSRequestType.INVALID_CORS;" is used.
Adding "PATCH" to both HTTP_METHODS and COMPLEX_HTTP_METHODS just purely
enables the use of the allowed methods filter param.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 57180] CorsFilter does not support PATCH method
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=57180
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Mark Thomas <ma...@apache.org> ---
Additional fix applied to trunk, 8.0.x (for 8.0.19 onwards) and 7.0.x (for
7.0.60 onwards).
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org