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
When an http request comes with GZip compressed, some request handler use Zlib::GzipReader to read from TeeInput (because it's in env['rack.input'], e.g. https://github.com/schacon/grack/blob/master/lib%2Fgrack.rb#L243), then if someone call request.body.rewind, the error happens:
undefined method `seek' for #PhusionPassenger::Utils::TeeInput:0x0000000d4c7ab8
The reason is GzipReader calls seek to do rewind
rewind()
Resets the position of the file pointer to the point created the GzipReader object. The associated IO object needs to respond to the seek method.
So can TeeInput implement seek? Thanks.
The text was updated successfully, but these errors were encountered:
Technically env['rack.input'] only needs to implement rewind (per the Rack specification) so Zlib::GzipReader is apparently depending on an optional feature.
When an http request comes with GZip compressed, some request handler use
Zlib::GzipReader
to read fromTeeInput
(because it's inenv['rack.input']
, e.g. https://github.com/schacon/grack/blob/master/lib%2Fgrack.rb#L243), then if someone callrequest.body.rewind
, the error happens:The reason is GzipReader calls
seek
to dorewind
So can TeeInput implement
seek
? Thanks.The text was updated successfully, but these errors were encountered: