mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-30 20:20:53 +00:00
Fix #31: Combine multiple header fields into a comma-separated list
This commit is contained in:
@@ -277,6 +277,12 @@ class CurlTest extends PHPUnit_Framework_TestCase {
|
||||
$this->assertFalse(file_exists($cookie_file));
|
||||
}
|
||||
|
||||
public function testMultipleCookieResponse() {
|
||||
$test = new Test();
|
||||
$test->server('multiple_cookie', 'GET');
|
||||
$this->assertEquals($test->curl->response_headers['Set-Cookie'], 'cookie1=scrumptious,cookie2=mouthwatering');
|
||||
}
|
||||
|
||||
public function testError() {
|
||||
$test = new Test();
|
||||
$test->curl->setOpt(CURLOPT_CONNECTTIMEOUT_MS, 2000);
|
||||
|
||||
@@ -80,6 +80,11 @@ else if ($test === 'cookiejar') {
|
||||
setcookie('mycookie', 'yum');
|
||||
exit;
|
||||
}
|
||||
else if ($test === 'multiple_cookie') {
|
||||
setcookie('cookie1', 'scrumptious');
|
||||
setcookie('cookie2', 'mouthwatering');
|
||||
exit;
|
||||
}
|
||||
else if ($test === 'response_header') {
|
||||
header('Content-Type: application/json');
|
||||
header('ETag: ' . md5('worldpeace'));
|
||||
|
||||
Reference in New Issue
Block a user