@@ -63,6 +63,18 @@ public function validContentTypes()
6363 ['POST ' , 'http://example.com/ ' , [], [], ['CONTENT_TYPE ' => 'application/json ' ], '["content"] ' ],
6464 ['POST ' , 'http://example.com/ ' , ['headers ' => $ defaultHeaders + ['content-type ' => 'application/json ' ], 'body ' => '["content"] ' , 'max_redirects ' => 0 ]],
6565 ];
66+ yield 'custom header with HTTP_ prefix ' => [
67+ ['PUT ' , 'http://example.com/ ' , [], [], ['HTTP_CONTENT_TYPE ' => 'application/json ' ], '["content"] ' ],
68+ ['PUT ' , 'http://example.com/ ' , ['headers ' => $ defaultHeaders + ['content-type ' => 'application/json ' ], 'body ' => '["content"] ' , 'max_redirects ' => 0 ]],
69+ ];
70+ yield 'modify notation of custom header with HTTP_ prefix ' => [
71+ ['PUT ' , 'http://example.com/ ' , [], [], ['HTTP_Content-Type ' => 'application/json ' ], '["content"] ' ],
72+ ['PUT ' , 'http://example.com/ ' , ['headers ' => $ defaultHeaders + ['content-type ' => 'application/json ' ], 'body ' => '["content"] ' , 'max_redirects ' => 0 ]],
73+ ];
74+ yield 'modify notation of custom header ' => [
75+ ['PUT ' , 'http://example.com/ ' , [], [], ['Content-Type ' => 'application/json ' ], '["content"] ' ],
76+ ['PUT ' , 'http://example.com/ ' , ['headers ' => $ defaultHeaders + ['content-type ' => 'application/json ' ], 'body ' => '["content"] ' , 'max_redirects ' => 0 ]],
77+ ];
6678 }
6779
6880 public function testMultiPartRequestWithSingleFile ()
0 commit comments