Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit c2cdc44

Browse files
committed
add test
1 parent 9e985d8 commit c2cdc44

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

test/Client/CurlTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,4 +524,24 @@ public function testTimeoutWithStream()
524524
}
525525
$this->assertNotNull($error, 'Failed to detect timeout in cURL adapter');
526526
}
527+
528+
/**
529+
* @see https://github.com/zendframework/zend-http/pull/184
530+
*
531+
*/
532+
public function testMustRemoveProxyConnectionEstablishedLine()
533+
{
534+
$this->client->setUri($this->baseuri . 'testProxyResponse.php');
535+
536+
$adapter = new Adapter\Curl();
537+
538+
$this->client->setAdapter($adapter);
539+
$this->client->setMethod('GET');
540+
$this->client->send();
541+
542+
$response = $this->client->getResponse();
543+
544+
$this->assertEquals(200, $response->getStatusCode());
545+
$this->assertEquals('work', $response->getBody());
546+
}
527547
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?php
2+
3+
echo "HTTP/1.1 200 Connection established\r\n\r\n";
4+
echo "HTTP/1.1 200 OK\r\n";
5+
echo "content-type: text/plain;charset=UTF-8\r\n";
6+
echo "server: Server\r\n";
7+
echo "\r\n";
8+
echo "work";

0 commit comments

Comments
 (0)