adutra commented on code in PR #15989:
URL: https://github.com/apache/iceberg/pull/15989#discussion_r3436021065


##########
core/src/test/java/org/apache/iceberg/rest/TestRESTUtil.java:
##########
@@ -142,12 +191,50 @@ public void 
testNamespaceUrlEncodeDecodeDoesNotAllowNull() {
   @SuppressWarnings("checkstyle:AvoidEscapedUnicodeCharacters")
   public void testOAuth2URLEncoding() {
     // from OAuth2, RFC 6749 Appendix B.
+    // encodeString uses form encoding: space -> +
     String utf8 = "\u0020\u0025\u0026\u002B\u00A3\u20AC";
     String expected = "+%25%26%2B%C2%A3%E2%82%AC";
 
     assertThat(RESTUtil.encodeString(utf8)).isEqualTo(expected);
   }

Review Comment:
   Added two more tests:
   
   - `encodePathAsOldAndNewClientDecodeAsOldServer`
   - `encodePathAsOldAndNewClientDecodeAsNewServer`
   
   I tried to highlight the fact that there is no one-size-fits-all solution 
for the decoding side.



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