Project

General

Profile

Actions

Feature #6492

closed

Inflate all HTTP Content-Encoding: deflate, gzip, x-gzip responses by default

Added by drbrain (Eric Hodel) over 12 years ago. Updated about 12 years ago.

Status:
Closed
Target version:
[ruby-core:45222]

Description

=begin
This patch moves the compression-handling code from Net::HTTP#get to Net::HTTPResponse to allow decompression to occur by default on any response body. (A future patch will set the Accept-Encoding on all requests that allow response bodies by default.)

Instead of having separate decompression code for deflate and gzip-encoded responses, (({Zlib::Inflate.new(32 + Zlib::MAX_WBITS)})) is used which automatically detects and inflated gzip-wrapped streams which allows for simpler processing of gzip bodies (no need to create a StringIO).
=end


Files

net.http.inflate_by_default.patch (7.28 KB) net.http.inflate_by_default.patch drbrain (Eric Hodel), 05/25/2012 09:15 AM
net.http.inflate_by_default.2.patch (8.32 KB) net.http.inflate_by_default.2.patch drbrain (Eric Hodel), 05/30/2012 08:45 AM
net.http.inflate_by_default.3.patch (9.36 KB) net.http.inflate_by_default.3.patch drbrain (Eric Hodel), 06/09/2012 06:47 AM
net.http.inflate_by_default.4.patch (9.42 KB) net.http.inflate_by_default.4.patch Updated to use streaming inflate drbrain (Eric Hodel), 07/11/2012 05:29 AM

Related issues 1 (0 open1 closed)

Blocks Ruby master - Feature #6494: Send Accept-Encoding for all HTTP requestsCloseddrbrain (Eric Hodel)05/25/2012Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0