You forgot to update the string's lenghts below. Nuno
[0]=> - string(29) "X-Powered-By: PHP/5.0.0" + string(29) "X-Powered-By" [1]=> - string(19) "Set-Cookie: foo=bar" + string(19) "Set-Cookie" [2]=> - string(18) "X-Sample-Test: foo" + string(18) "X-Sample-Test" [3]=> - string(24) "Content-type: text/plain" + string(24) "Content-type" } ]]>