jacktengg commented on code in PR #68011:
URL: https://github.com/apache/doris/pull/68011#discussion_r4032318132


##########
be/src/util/url_parser.cpp:
##########
@@ -226,61 +227,81 @@ bool UrlParser::parse_url_key(const StringRef& url, 
UrlPart part, const StringRe
     // Remove leading and trailing spaces.
     StringRef trimmed_url = url.trim();
 
-    // Search for the key in the url, ignoring malformed URLs for now.
+    // The key can only be found in the query component, which starts at the 
first '?' and ends
+    // before the '#' that starts the fragment (if any).
+    int32_t query_pos = _s_question_search.search(&trimmed_url);
+    if (query_pos < 0) {
+        // Query component is missing, the whole url is the path plus the 
fragment.
+        return false;
+    }

Review Comment:
   fixed



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to