-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug in transforming headers for response (#8)
* Fixed problem when header has colons in the content --------- Co-authored-by: Garry Childs <garry.childs@xigen.co.uk> Co-authored-by: Bryan Nielsen <bryan@packettide.com>
- Loading branch information
1 parent
cc96d4e
commit 0d8ef2f
Showing
5 changed files
with
53 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace Tests\Core; | ||
|
||
use Expressionengine\Coilpack\Response; | ||
use Tests\TestCase; | ||
|
||
class ResponseTest extends TestCase | ||
{ | ||
public function test_parsing_headers_with_multiple_colons() | ||
{ | ||
ee()->output->set_header('test: one:two:three'); | ||
|
||
$response = (new Response)->fromOutput(); | ||
|
||
$this->assertEquals($response->headers->get('Expires'), 'Mon, 26 Jul 1997 05:00:00 GMT'); | ||
$this->assertEquals($response->headers->get('test'), 'one:two:three'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters