plusplusjiajia commented on code in PR #893:
URL: https://github.com/apache/iceberg-cpp/pull/893#discussion_r3855363364


##########
src/iceberg/util/location_util.cc:
##########
@@ -19,14 +19,45 @@
 
 #include "iceberg/util/location_util.h"
 
+#include <algorithm>
+#include <cctype>
+
 namespace iceberg {
 
+namespace {
+
+/// Whether `candidate` is a syntactically valid URI scheme (RFC 3986 section
+/// 3.1): a letter followed by letters, digits, `+`, `-` or `.`.
+bool IsValidScheme(std::string_view candidate) {
+  if (candidate.empty() || !std::isalpha(static_cast<unsigned 
char>(candidate.front()))) {

Review Comment:
   @wgtmac  Done — explicit ASCII checks.



-- 
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