1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-25 02:22:57 +01:00

[Http] Adding test to ensure that POST requests with empty POST field arrays are always sent as POST. Closes #110.

This commit is contained in:
Michael Dowling 2012-07-30 12:22:42 -07:00
parent 58d6432726
commit 522fbe0f36

View File

@ -477,6 +477,22 @@ class CurlHandleTest extends \Guzzle\Tests\GuzzleTestCase
'Content-Length' => '0',
'!Transfer-Encoding' => null
)),
// Send a POST request with empty post fields
array('POST', 'http://localhost:8124/post.php', null, array(), array(
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => array (
'Expect:',
'Host: localhost:8124',
'User-Agent: ' . $userAgent
)
), array(
'_Accept' => '*',
'_Accept-Encoding' => '*',
'Host' => '*',
'User-Agent' => '*',
'Content-Length' => '0',
'!Transfer-Encoding' => null
)),
// Send a PATCH request
array('PATCH', 'http://localhost:8124/patch.php', null, 'body', array(
CURLOPT_INFILESIZE => 4,