This repository was archived by the owner on Jan 30, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -397,4 +397,31 @@ public function testSetCurlOptPostFields()
397
397
$ this ->client ->send ();
398
398
$ this ->assertEquals ('foo=bar ' , $ this ->client ->getResponse ()->getBody ());
399
399
}
400
+
401
+
402
+ /**
403
+ * @group ZF-7683
404
+ * @see https://github.com/zendframework/zend-http/pull/53
405
+ *
406
+ * Note: The headers stored in ZF7683-chunked.php are case insensitive
407
+ */
408
+ public function testNoCaseSensitiveHeaderName ()
409
+ {
410
+ $ this ->client ->setUri ($ this ->baseuri . 'ZF7683-chunked.php ' );
411
+
412
+ $ adapter = new Adapter \Curl ();
413
+ $ adapter ->setOptions ([
414
+ 'curloptions ' => [
415
+ CURLOPT_ENCODING => '' ,
416
+ ],
417
+ ]);
418
+ $ this ->client ->setAdapter ($ adapter );
419
+ $ this ->client ->setMethod ('GET ' );
420
+ $ this ->client ->send ();
421
+
422
+ $ headers = $ this ->client ->getResponse ()->getHeaders ();
423
+
424
+ $ this ->assertFalse ($ headers ->has ('Transfer-Encoding ' ));
425
+ $ this ->assertFalse ($ headers ->has ('Content-Encoding ' ));
426
+ }
400
427
}
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