[ruby-cvs:78709] 5105240b1e (master): lib/net/http/response.rb: support raw deflate correctly
"Yusuke Endoh" <[email protected]>
| Newsgroups | gmane.comp.lang.ruby.cvs |
|---|---|
| Message-ID | <[email protected]> |
Yusuke Endoh 2019-12-16 23:20:42 +0900 (Mon, 16 Dec 2019)
New Revision: 5105240b1e
https://github.com/ruby/ruby/commit/5105240b1e
Log:
lib/net/http/response.rb: support raw deflate correctly
Net::HTTP had used `Zlib::Inflate.new(32 + Zlib::MAX_WBITS)` for all
content encoding (deflate, zlib, and gzip).
But the argument `32 + Zlib::MAX_WBITS` means zlib and gzip decoding
with automatic header detection, so (raw) deflate compression had not
been supported.
This change makes it support raw deflate correctly by passing an
argument `-Zlib::MAX_WBITS` (which means raw deflate) to
`Zlib::Inflate.new`. All deflate-mode tests are fixed too.
[Bug #11268]
Modified files:
lib/net/http/response.rb
test/net/http/test_httpresponse.rb