@@ -107,9 +107,9 @@ def test_read_body_content_encoding_deflate
107107HTTP/1.1 200 OK
108108Connection: close
109109Content-Encoding: deflate
110- Content-Length: 7
110+ Content-Length: 13
111111
112- \ xCB H\xCD \xC9 \xC9 \a \x00
112+ x \x9C \ xCB H\xCD \xC9 \xC9 \a \x00 \x06 , \x02 \x15
113113EOS
114114
115115 res = Net ::HTTPResponse . read_new ( io )
@@ -126,7 +126,7 @@ def test_read_body_content_encoding_deflate
126126 assert_equal 'hello' , body
127127 else
128128 assert_equal 'deflate' , res [ 'content-encoding' ]
129- assert_equal "\ xCB H\xCD \xC9 \xC9 \a \x00 " , body
129+ assert_equal "x \x9C \ xCB H\xCD \xC9 \xC9 \a \x00 \x06 , \x02 \x15 " , body
130130 end
131131 end
132132
@@ -135,9 +135,9 @@ def test_read_body_content_encoding_deflate_uppercase
135135HTTP/1.1 200 OK
136136Connection: close
137137Content-Encoding: DEFLATE
138- Content-Length: 7
138+ Content-Length: 13
139139
140- \ xCB H\xCD \xC9 \xC9 \a \x00
140+ x \x9C \ xCB H\xCD \xC9 \xC9 \a \x00 \x06 , \x02 \x15
141141EOS
142142
143143 res = Net ::HTTPResponse . read_new ( io )
@@ -154,7 +154,7 @@ def test_read_body_content_encoding_deflate_uppercase
154154 assert_equal 'hello' , body
155155 else
156156 assert_equal 'DEFLATE' , res [ 'content-encoding' ]
157- assert_equal "\ xCB H\xCD \xC9 \xC9 \a \x00 " , body
157+ assert_equal "x \x9C \ xCB H\xCD \xC9 \xC9 \a \x00 \x06 , \x02 \x15 " , body
158158 end
159159 end
160160
@@ -165,10 +165,10 @@ def test_read_body_content_encoding_deflate_chunked
165165Content-Encoding: deflate
166166Transfer-Encoding: chunked
167167
168- 4
169- \xCB H\xCD \xC9
170- 3
171- \xC9 \a \x00
168+ 6
169+ x \x9C \xCB H\xCD \xC9
170+ 7
171+ \xC9 \a \x00 \x06 , \x02 \x15
1721720
173173
174174EOS
@@ -187,7 +187,7 @@ def test_read_body_content_encoding_deflate_chunked
187187 assert_equal 'hello' , body
188188 else
189189 assert_equal 'deflate' , res [ 'content-encoding' ]
190- assert_equal "\ xCB H\xCD \xC9 \xC9 \a \x00 " , body
190+ assert_equal "x \x9C \ xCB H\xCD \xC9 \xC9 \a \x00 \x06 , \x02 \x15 " , body
191191 end
192192 end
193193
@@ -196,9 +196,9 @@ def test_read_body_content_encoding_deflate_disabled
196196HTTP/1.1 200 OK
197197Connection: close
198198Content-Encoding: deflate
199- Content-Length: 7
199+ Content-Length: 13
200200
201- \ xCB H\xCD \xC9 \xC9 \a \x00
201+ x \x9C \ xCB H\xCD \xC9 \xC9 \a \x00 \x06 , \x02 \x15
202202EOS
203203
204204 res = Net ::HTTPResponse . read_new ( io )
@@ -211,7 +211,7 @@ def test_read_body_content_encoding_deflate_disabled
211211 end
212212
213213 assert_equal 'deflate' , res [ 'content-encoding' ] , 'Bug #7831'
214- assert_equal "\ xCB H\xCD \xC9 \xC9 \a \x00 " , body , 'Bug #7381'
214+ assert_equal "x \x9C \ xCB H\xCD \xC9 \xC9 \a \x00 \x06 , \x02 \x15 " , body , 'Bug #7381'
215215 end
216216
217217 def test_read_body_content_encoding_deflate_no_length
@@ -220,7 +220,7 @@ def test_read_body_content_encoding_deflate_no_length
220220Connection: close
221221Content-Encoding: deflate
222222
223- \ xCB H\xCD \xC9 \xC9 \a \x00
223+ x \x9C \ xCB H\xCD \xC9 \xC9 \a \x00 \x06 , \x02 \x15
224224EOS
225225
226226 res = Net ::HTTPResponse . read_new ( io )
@@ -237,7 +237,7 @@ def test_read_body_content_encoding_deflate_no_length
237237 assert_equal 'hello' , body
238238 else
239239 assert_equal 'deflate' , res [ 'content-encoding' ]
240- assert_equal "\ xCB H\xCD \xC9 \xC9 \a \x00 \r \n " , body
240+ assert_equal "x \x9C \ xCB H\xCD \xC9 \xC9 \a \x00 \x06 , \x02 \x15 \r \n " , body
241241 end
242242 end
243243
0 commit comments