sudheerv commented on a change in pull request #6950:
URL: https://github.com/apache/trafficserver/pull/6950#discussion_r446284482
##########
File path: proxy/logging/LogAccess.cc
##########
@@ -1144,7 +1144,7 @@ void
LogAccess::set_client_req_url(char *buf, int len)
{
if (buf) {
- m_client_req_url_len = len;
+ m_client_req_url_len = (m_client_req_url_len <= len) ?
m_client_req_url_len : len;
Review comment:
yeah, makes sense. Although, the method sets `m_client_req_url_len` to
the new length (possibly, the setter gets called multiple times?), so I'll go
with your first suggestion and leave the "+1" (for strlcpy) explicit.
```
m_client_req_url_len = std::min(m_client_req_url_len, len);
```
----------------------------------------------------------------
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]