jpeach commented on code in PR #10144:
URL: https://github.com/apache/trafficserver/pull/10144#discussion_r1283804456


##########
proxy/hdrs/HTTP.cc:
##########
@@ -1264,9 +1264,14 @@ validate_hdr_content_length(HdrHeap *heap, HTTPHdrImpl 
*hh)
     int content_length_len         = 0;
     const char *content_length_val = 
content_length_field->value_get(&content_length_len);
 
-    // RFC 7230 section 3.3.2
+    // RFC 9110 section 8.6.
     // Content-Length = 1*DIGIT
     //
+    if (content_length_len == 0) {

Review Comment:
   `content_length_len` is int, so while `value_get` doesn't actually ever 
return negative, people reading the call sires still have to keep that i mind.
   
   Could we remove this version of `value_get` so that the unambiguous 
`string_view` version is the only version?



-- 
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: github-unsubscr...@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to