Commit 1c726bcb32
Changed files (3)
lib
std
lib/std/http/Client.zig
@@ -762,6 +762,7 @@ pub const Request = struct {
req.response.skip = false;
if (!req.response.parser.done) {
if (req.response.transfer_compression) |tc| switch (tc) {
+ .identity => req.response.compression = .none,
.compress => return error.CompressionNotSupported,
.deflate => req.response.compression = .{
.deflate = std.compress.zlib.decompressStream(req.client.allocator, req.transferReader()) catch return error.CompressionInitializationFailed,
lib/std/http/Server.zig
@@ -528,6 +528,7 @@ pub const Response = struct {
if (!res.request.parser.done) {
if (res.request.transfer_compression) |tc| switch (tc) {
+ .identity => res.request.compression = .none,
.compress => return error.CompressionNotSupported,
.deflate => res.request.compression = .{
.deflate = std.compress.zlib.decompressStream(res.allocator, res.transferReader()) catch return error.CompressionInitializationFailed,
lib/std/http.zig
@@ -285,6 +285,7 @@ pub const TransferEncoding = enum {
};
pub const ContentEncoding = enum {
+ identity,
compress,
deflate,
gzip,