bneradt commented on code in PR #13410:
URL: https://github.com/apache/trafficserver/pull/13410#discussion_r3708496221
##########
src/iocore/cache/CacheVC.cc:
##########
@@ -210,6 +210,14 @@ CacheVC::do_io_write(Continuation *c, int64_t nbytes,
IOBufferReader *abuf, bool
vio.ndone = 0;
vio.nbytes = nbytes;
vio.vc_server = this;
+ if (nbytes == 0) {
+ // A zero-byte write represents an empty document, while closing without a
+ // write represents a header-only update.
+ f.allow_empty_doc = 1;
+ if (alternate.valid()) {
Review Comment:
Good point. I moved the debug mutex assertion above the zero-byte handling
so the locking invariant is checked before accessing alternate or
f.allow_empty_doc.
--
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]