File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -397,4 +397,29 @@ public function testSetCurlOptPostFields()
397397 $ this ->client ->send ();
398398 $ this ->assertEquals ('foo=bar ' , $ this ->client ->getResponse ()->getBody ());
399399 }
400+
401+ /**
402+ * @group ZF-7683
403+ * @see https://github.com/zendframework/zend-http/pull/53
404+ *
405+ * Note: The headers stored in ZF7683-chunked.php are case insensitive
406+ */
407+ public function testNoCaseSensitiveHeaderName ()
408+ {
409+ $ this ->client ->setUri ($ this ->baseuri . 'ZF7683-chunked.php ' );
410+
411+ $ adapter = new Adapter \Curl ();
412+ $ adapter ->setOptions ([
413+ 'curloptions ' => [
414+ CURLOPT_ENCODING => '' ,
415+ ],
416+ ]);
417+ $ this ->client ->setAdapter ($ adapter );
418+ $ this ->client ->setMethod ('GET ' );
419+ $ this ->client ->send ();
420+
421+ $ headers = $ this ->client ->getResponse ()->getHeaders ();
422+ $ this ->assertFalse ($ headers ->has ('Transfer-Encoding ' ));
423+ $ this ->assertFalse ($ headers ->has ('Content-Encoding ' ));
424+ }
400425}
Original file line number Diff line number Diff line change 1+ <?php
2+ // intentional use of case-insensitive header name
3+ header ("Transfer-encoding: chunked " );
4+ header ("content-encoding: gzip " );
You can’t perform that action at this time.
0 commit comments