zhztheplayer commented on a change in pull request #1218: [CALCITE-3067] Splunk 
Calcite adapter cannot parse right session keys from Splunk 7.2
URL: https://github.com/apache/calcite/pull/1218#discussion_r285324733
 
 

 ##########
 File path: 
splunk/src/main/java/org/apache/calcite/adapter/splunk/search/SplunkConnectionImpl.java
 ##########
 @@ -58,7 +58,7 @@
 
   private static final Pattern SESSION_KEY =
       Pattern.compile(
-          "<response>\\s*<sessionKey>([0-9a-f]+)</sessionKey>\\s*</response>");
+          "<sessionKey>(.+)<\\/sessionKey>");
 
 Review comment:
   Not familiar with Splunk's session yet, however as the implementation of 
Regex sign `+` in Java is based on longest matching, I am not sure if it's safe 
enough to use `.+` here. Is `([0-9a-f]+)` not able to match the content in this 
case?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to