Skip to content

Commit

Permalink
use klauspost/compress
Browse files Browse the repository at this point in the history
  • Loading branch information
dogancanbakir committed Jul 17, 2024
1 parent 6d95188 commit e36d036
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions http/normalization.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ package httputil

import (
"bytes"
"compress/gzip"
"compress/zlib"
"fmt"
"io"
"net/http"
"strings"

"github.com/andybalholm/brotli"
"github.com/dsnet/compress/brotli"
"github.com/klauspost/compress/gzip"
"github.com/klauspost/compress/zlib"
"github.com/klauspost/compress/zstd"
"github.com/pkg/errors"
"golang.org/x/text/encoding/simplifiedchinese"
Expand Down Expand Up @@ -73,7 +73,7 @@ func wrapDecodeReader(resp *http.Response) (rc io.ReadCloser, err error) {
case "deflate":
rc, err = zlib.NewReader(resp.Body)
case "br":
rc = io.NopCloser(brotli.NewReader(resp.Body))
rc, err = brotli.NewReader(resp.Body, nil)
case "zstd":
var zstdReader *zstd.Decoder
zstdReader, err = zstd.NewReader(resp.Body)
Expand Down

0 comments on commit e36d036

Please sign in to comment.