@@ -533,7 +533,7 @@ func Test_Ctx_Body_With_Compression(t *testing.T) {
533533 encs := strings .Split (tCase .contentEncoding , "," )
534534 for _ , enc := range encs {
535535 enc = strings .TrimSpace (enc )
536- if strings .Contains (tCase .name , "invalid_deflate" ) && enc == "deflate" {
536+ if strings .Contains (tCase .name , "invalid_deflate" ) && enc == StrDeflate {
537537 continue
538538 }
539539 switch enc {
@@ -545,7 +545,7 @@ func Test_Ctx_Body_With_Compression(t *testing.T) {
545545 require .NoError (t , gz .Flush ())
546546 require .NoError (t , gz .Close ())
547547 tCase .body = b .Bytes ()
548- case "deflate" :
548+ case StrDeflate :
549549 var b bytes.Buffer
550550 fl := zlib .NewWriter (& b )
551551 _ , err := fl .Write (tCase .body )
@@ -625,7 +625,7 @@ func Benchmark_Ctx_Body_With_Compression(b *testing.B) {
625625 compressWriter : compressGzip ,
626626 },
627627 {
628- contentEncoding : "deflate" ,
628+ contentEncoding : StrDeflate ,
629629 compressWriter : compressDeflate ,
630630 },
631631 {
@@ -763,7 +763,7 @@ func Test_Ctx_Body_With_Compression_Immutable(t *testing.T) {
763763 encs := strings .Split (tCase .contentEncoding , "," )
764764 for _ , enc := range encs {
765765 enc = strings .TrimSpace (enc )
766- if strings .Contains (tCase .name , "invalid_deflate" ) && enc == "deflate" {
766+ if strings .Contains (tCase .name , "invalid_deflate" ) && enc == StrDeflate {
767767 continue
768768 }
769769 switch enc {
@@ -775,7 +775,7 @@ func Test_Ctx_Body_With_Compression_Immutable(t *testing.T) {
775775 require .NoError (t , gz .Flush ())
776776 require .NoError (t , gz .Close ())
777777 tCase .body = b .Bytes ()
778- case "deflate" :
778+ case StrDeflate :
779779 var b bytes.Buffer
780780 fl := zlib .NewWriter (& b )
781781 _ , err := fl .Write (tCase .body )
@@ -855,7 +855,7 @@ func Benchmark_Ctx_Body_With_Compression_Immutable(b *testing.B) {
855855 compressWriter : compressGzip ,
856856 },
857857 {
858- contentEncoding : "deflate" ,
858+ contentEncoding : StrDeflate ,
859859 compressWriter : compressDeflate ,
860860 },
861861 {
0 commit comments