zeroshade commented on code in PR #2074:
URL: https://github.com/apache/iceberg-go/pull/2074#discussion_r4169435373


##########
catalog/rest/rest.go:
##########
@@ -1421,13 +1421,20 @@ func (r *Catalog) nsSeparator() string {
        return r.namespaceSeparator
 }
 
+// encodePathSegment escapes a REST path segment per RFC 3986. PathEscape
+// leaves plus signs literal, so encode them explicitly to avoid form decoders
+// interpreting them as spaces.
+func encodePathSegment(value string) string {
+       return strings.ReplaceAll(url.PathEscape(value), "+", "%2B")

Review Comment:
   Nit for the follow-up: `escapeOpaquePathSegment` (`scan_planning.go`) 
duplicates this function and still leaves `+` unencoded in plan-id segments. 
Java uses `encodePathSegment` for plan ids too.



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