if (ctx->state == PRE_HEAD) { if (!empty) { pass /* reset deleted from here */ } reset /* reset added here */ } else if (ctx->state == PARSED) { /* Invalid internal condition... */ ... } else { /* Entire brigade is middle chunk of SSI tag... */ ... }
My contention is simply that the reset should be coupled with the pass, inside the if. Did I miss something in the patch?
Paul J. Reder
André Malo wrote:
* Paul J. Reder wrote:
The "ctx->bytes_parsed = 0;" *should* be inside the if block. bytes_parsed should only be reset to 0 if the parsed bytes are passed on (via ap_pass_brigade()). bytes_parsed is supposed to indicate the number of bytes in the currently held brigade which have been parsed. If it exceeds BYTE_COUNT_THRESHOLD then we forward the initial part of the brigade. This is to keep from buffering up huge chunks of data.
Just to clarify, one could write the patch as:
if (!empty) { pass reset } else { reset }
The else branch means if (empty), so it would (not) be valid to reset? Why? I bet, I'm just a missing a brigade somewhere :)
nd
-- Paul J. Reder ----------------------------------------------------------- "The strength of the Constitution lies entirely in the determination of each citizen to defend it. Only if every single citizen feels duty bound to do his share in this defense are the constitutional rights secure." -- Albert Einstein