maskit commented on code in PR #12961:
URL: https://github.com/apache/trafficserver/pull/12961#discussion_r2934513906
##########
src/iocore/net/ProxyProtocol.cc:
##########
@@ -453,6 +454,18 @@ proxy_protocol_v2_build(uint8_t *buf, size_t max_buf_len,
const ProxyProtocol &p
} // namespace
+bool
+proxy_protocol_detect(swoc::TextView tv)
+{
+ if (tv.size() >= PPv1_CONNECTION_HEADER_LEN_MIN &&
tv.starts_with(PPv1_CONNECTION_PREFACE)) {
+ return true;
+ } else if (tv.size() >= PPv2_CONNECTION_HEADER_LEN &&
tv.starts_with(PPv2_CONNECTION_PREFACE)) {
+ return true;
+ } else {
+ return false;
+ }
Review Comment:
Don't repeat same thing. Can't test TLV with current tools.
--
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]