Copilot commented on code in PR #3589:
URL: https://github.com/apache/brpc/pull/3589#discussion_r4214009112


##########
src/brpc/builtin/rpcz_service.cpp:
##########
@@ -606,7 +606,8 @@ void 
RpczService::default_method(::google::protobuf::RpcController* cntl_base,
         } else {
             start_tm = ParseDateTime(*time_str);
             if (start_tm < 0) {
-                os << "Invalid " << TIME_STR << "=`" << time_str << '\''
+                os << "Invalid " << TIME_STR << "=`"
+                   << (use_html ? WebEscape(*time_str) : *time_str) << '\''

Review Comment:
   The PR description says plain-text `/rpcz` output is unchanged, but this 
branch changes it from streaming the `std::string*` address to streaming the 
actual invalid query value (`*time_str`). That behavior change appears 
intentional to fix the pointer leak, so please update the stated side effects 
(and, ideally, add a plain-text assertion to make the intended behavior 
explicit).



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