Debian Codegraph @

debian/patches/0002-Update-expected-length-for-compression-in-Go-1.27.patch

raw
1 From: "Dr. Tobias Quathamer" <[email protected]>
2 Date: Sun, 13 Sep 2026 00:31:06 +0200
3 Subject: Update expected length for compression in Go 1.27.
4
5 See https://go.dev/doc/go1.27#compressflatepkgcompressflate
6
7 Closes: #1146201
8 ---
9 compress_test.go | 8 ++++----
10 1 file changed, 4 insertions(+), 4 deletions(-)
11
12 diff --git a/compress_test.go b/compress_test.go
13 index 25fdbe9..1b533b5 100644
14 --- a/compress_test.go
15 +++ b/compress_test.go
16 @@ -136,8 +136,8 @@ func TestCompressHandlerGzip(t *testing.T) {
17 if resp.Header.Get("Content-Type") != "text/plain; charset=utf-8" {
18 t.Errorf("wrong content type, got %s want %s", resp.Header.Get("Content-Type"), "text/plain; charset=utf-8")
19 }
20 - if w.Body.Len() != 72 {
21 - t.Errorf("wrong len, got %d want %d", w.Body.Len(), 72)
22 + if w.Body.Len() != 68 {
23 + t.Errorf("wrong len, got %d want %d", w.Body.Len(), 68)
24 }
25 if l := resp.Header.Get("Content-Length"); l != "" {
26 t.Errorf("wrong content-length. got %q expected %q", l, "")
27 @@ -154,8 +154,8 @@ func TestCompressHandlerDeflate(t *testing.T) {
28 if resp.Header.Get("Content-Type") != "text/plain; charset=utf-8" {
29 t.Fatalf("wrong content type, got %s want %s", resp.Header.Get("Content-Type"), "text/plain; charset=utf-8")
30 }
31 - if w.Body.Len() != 54 {
32 - t.Fatalf("wrong len, got %d want %d", w.Body.Len(), 54)
33 + if w.Body.Len() != 50 {
34 + t.Fatalf("wrong len, got %d want %d", w.Body.Len(), 50)
35 }
36 }
37