SolidWallOfCode commented on code in PR #8976:
URL: https://github.com/apache/trafficserver/pull/8976#discussion_r945696700
##########
iocore/cache/CacheRead.cc:
##########
@@ -1175,6 +1175,20 @@ CacheVC::openReadStartHead(int event, Event *e)
} else {
f.single_fragment = false;
}
+
+ // Now that we have selected an alternate, validate that the content
length and object size match
+ MIMEField *field =
alternate.response_get()->field_find(MIME_FIELD_CONTENT_LENGTH,
MIME_LEN_CONTENT_LENGTH);
Review Comment:
A few style things -
```
if ( auto field =
alternate.response_get()->field_find(MIIME_FIELD_CONTENT_LENGTH,
MIME_LEN_CONTENT_LENGTH) ; field ) {
if ( auto cl = static_cast<uint64_t>(field->value_get_int64()) ; cl !=
doc_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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]