sundapeng commented on PR #7137:
URL: https://github.com/apache/paimon/pull/7137#issuecomment-3809427381

   
   After investigation, The following behavior is confirmed :
   
   The `HttpClient` GET method itself works correctly. However, signer may need 
special encoding handling for query parameters.
   
   ### Example
   
   For a GET request like:
   ```
   GET /v1/.../view-details?viewNamePattern=view%
   ```
   
   **Current Flow:**
   ```
   Original parameters: view%
       |
       |  <- First encoding
       ↓
   Client signature: view%25 
       |
       |   <- Second encoding
       ↓
   HTTP request: view%2525
       ↓
   Server receives: view%2525
       |
       |  <- (Default behavior of web container, such as Tomcat)
       ↓  
   Server decodes: view%25 
       ↓
   Server signature: view%25
       ↓
   ✅ Verification matches
   ```
   
   ### Summary
   
   1. **Query parameters undergo double encoding:**
      - First encoding in `RESTAuthParameter` constructor: `view%` → `view%25`
      - Second encoding by `URIBuilder.addParameter()`: `view%25` → `view%2525`
   
   2. **Aware of this encoding behavior**
      - When implementing server-side signature verification, must be aware of 
this encoding behavior and handle it according to specific authentication 
protocol requirements
   


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

Reply via email to