snleee commented on a change in pull request #6667:
URL: https://github.com/apache/incubator-pinot/pull/6667#discussion_r602121089



##########
File path: 
pinot-common/src/main/java/org/apache/pinot/common/protocols/SegmentCompletionProtocol.java
##########
@@ -180,6 +184,16 @@ private Request(Params params, String msgType) {
     }
 
     public String getUrl(String hostPort, String protocol) {
+      String streamPartitionMsgOffset;
+      try {
+        streamPartitionMsgOffset = _params.getStreamPartitionMsgOffset() == 
null ? null :
+            URLEncoder.encode(_params.getStreamPartitionMsgOffset(), 
StandardCharsets.UTF_8.toString());

Review comment:
       How do we deal with the segment name parameter? What happens if we 
assign some string value as a segment name that will be broken on the receiver 
side without URL encoding?
   
   IMO, we should encode to URL format for everything. Whatever value provided 
to the `_params`, the same value should be read by the component that will 
receive this request and parse the parameters from the request.




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

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