https://bz.apache.org/bugzilla/show_bug.cgi?id=69545

--- Comment #9 from Remy Maucherat <r...@apache.org> ---
(In reply to Aravinda from comment #8)
> For the non blocking mode, this is working fine. 
> The issue is happening in the spring cloud gateway application(blocking
> mode) which will just delegate the request to the downstream application
> after some processing like authentication. The downstream application
> executes in non-blocking mode. If we directly call the downstream
> application with the same request its working fine.
> 
> 
> Do we have the below code in the blocking mode too? looks like its setting
> available = 0 even though the all the chunks reading/entire request body is
> not read.
> 
> 
> 
> 
>         if (available == 1 && parseState == ParseState.CHUNK_BODY_CRLF) {
>             // Either just the CR or just the LF are left in the buffer.
> There is no data to read.
>             available = 0;
>         } else if (available == 2 && !crFound && parseState ==
> ParseState.CHUNK_BODY_CRLF) {
>             // Just CRLF is left in the buffer. There is no data to read.
>             available = 0;
>         }

Yes, it's valid if available() returns 0 in blocking mode, it means that there
is no data available for reading without blocking until some data becomes
available. >0 means a read will not block since data is already available in
some buffer.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to