You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by GitBox <gi...@apache.org> on 2021/10/13 05:33:55 UTC

[GitHub] [cxf] vladimirfx commented on a change in pull request #862: Fix not unique JAXRS method candidates WARN caused by CrossOriginResourceSharingFilter

vladimirfx commented on a change in pull request #862:
URL: https://github.com/apache/cxf/pull/862#discussion_r727712791



##########
File path: rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
##########
@@ -290,8 +291,21 @@ private OperationResourceInfo findPreflightMethod(
                                                       String httpMethod,
                                                       MultivaluedMap<String, String> values,
                                                       Message m) {
-        final String contentType = MediaType.WILDCARD;
-        final MediaType acceptType = MediaType.WILDCARD_TYPE;
+        Map<String, List<String>> protocolHeaders = CastUtils.cast((Map<?, ?>)m.get(Message.PROTOCOL_HEADERS));

Review comment:
       This implementation is based on the main JAXRS routing code. It is really a good idea to differ that logic?
   I think it is best to extract some common code for extraction of content-type and accept headers to JAXRSUtils. What do you think?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@cxf.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org