You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JerseyServerHandler uses the same NettyInputStream across all messages and if a request does not close it's entity input stream a chunk of it's data will be visible to the next request on the same channel.
The handler tries to reset the inputStream between messages by calling nettyInputStream.clear
However clear does not fully reset the NettyInputStream. It does not null out buffer or current so the next call to read will return data from buffer which is data from the previous call.
Clear should be fixed. It should null cause, reading, buffer, and current. It may be appropriate to notifyAll and cleanup buffers in isList. You could also or instead allocate a new NettyInputStream instead of reusing the same.
The text was updated successfully, but these errors were encountered:
JerseyServerHandler uses the same NettyInputStream across all messages and if a request does not close it's entity input stream a chunk of it's data will be visible to the next request on the same channel.
The handler tries to reset the inputStream between messages by calling
nettyInputStream.clear
https://github.com/eclipse-ee4j/jersey/blob/master/containers/netty-http/src/main/java/org/glassfish/jersey/netty/httpserver/JerseyServerHandler.java#L83
However
clear
does not fully reset the NettyInputStream. It does not null outbuffer
orcurrent
so the next call toread
will return data frombuffer
which is data from the previous call.Clear should be fixed. It should null
cause
,reading
,buffer
, andcurrent
. It may be appropriate to notifyAll and cleanup buffers in isList. You could also or instead allocate a new NettyInputStream instead of reusing the same.The text was updated successfully, but these errors were encountered: