From 378d829e8fce8eab9b0a9af9ffe74585e00e3dca Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Wed, 10 Jul 2013 12:47:13 +0100 Subject: [PATCH] Adding test to prove issue with HTTP Header parsing in RestfulService I have a header like: X-BB-Auth: xxxx and it is being given back to me as X-Bb-Auth - i want to prove the issue and the fix --- tests/api/RestfulServiceTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/api/RestfulServiceTest.php b/tests/api/RestfulServiceTest.php index a9248db3a..772ccd9ef 100644 --- a/tests/api/RestfulServiceTest.php +++ b/tests/api/RestfulServiceTest.php @@ -172,12 +172,14 @@ class RestfulServiceTest extends SapphireTest { public function testHttpHeaderParseing() { $headers = "content-type: text/html; charset=UTF-8\r\n". "Server: Funky/1.0\r\n". + "X-BB-ExampleMANycaPS: test\r\n". "Set-Cookie: foo=bar\r\n". "Set-Cookie: baz=quux\r\n". "Set-Cookie: bar=foo\r\n"; $expected = array( 'Content-Type' => 'text/html; charset=UTF-8', 'Server' => 'Funky/1.0', + 'X-BB-ExampleMANycaPS' => 'test', 'Set-Cookie' => array( 'foo=bar', 'baz=quux',