amarkevich commented on a change in pull request #481: CXF-7923 String.split 
via fastpath instead of precompiled Pattern
URL: https://github.com/apache/cxf/pull/481#discussion_r239787384
 
 

 ##########
 File path: 
rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java
 ##########
 @@ -254,10 +257,15 @@ public MediaType getMediaType() {
         return getHeaderValues(headerName, originalValue, DEFAULT_SEPARATOR);
     }
 
-    private List<String> getHeaderValues(String headerName, String 
originalValue, String sep) {
+    private static List<String> getHeaderValues(String headerName, String 
originalValue, String sep) {
         if (!originalValue.contains(QUOTE)
             || HEADERS_WITH_POSSIBLE_QUOTES.contains(headerName)) {
-            String[] ls = StringUtils.split(originalValue, sep);
+            final String[] ls; 
+            if (COOKIE_SEPARATOR_CRLF_EXPRESSION != sep) {
+                ls = originalValue.split(sep);
+            } else {
+                ls = COOKIE_SEPARATOR_CRLF_PATTERN.split(originalValue);
+            }
 
 Review comment:
   only CRLF accepted (HttpHeadersImplTest#testInvalidCookieSeparator)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to