hk2166 commented on PR #16786:
URL: https://github.com/apache/grails-core/pull/16786#issuecomment-6502143164

   All three points are addressed in 3847d6f006 (details inline):
   
   - **mark/reset**: the task's reader keeps its own mark, live and across the 
copy, and the task's stream does when the live stream supports one.
   - **Attributes set during the copy**: a task's calls to the live request and 
the copy no longer interleave. Tasks still call the request at the same time, 
and once the copy is taken their calls go to it.
   - **A reader that read ahead**: the copy reads the rest of the body from the 
stream or reader a task took, encoded as that reader decoded it, and from what 
a reader of the request holds when the stream has nothing left.
   
   Before pushing, I had the change reviewed independently, looking for what 
you'd find next. The review found five more problems, and this commit fixes 
them:
   - The copy read the body from the request rather than from the reader the 
task held, which loses what a wrapper's new reader skipped.
   - A line ended by `\r` waited for the next character.
   - `mark(Integer.MAX_VALUE)` overflowed.
   - A failure reading the rest of the body ended the body or dropped the copy.
   - A task's call could hold every other task's calls.
   
   On 48f61a443b, the 12 new test cases fail, each on its own point. With this 
commit, the module's 93 tests pass, and so do the pubsub demo's 22 integration 
tests. Checkstyle, CodeNarc, PMD and the repository conventions are clean, and 
the guide builds with the updated paragraph.
   


-- 
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]

Reply via email to