changed regexp for response code

Facebook servers have now HTTP response without status string. The use 
"HTTP/1.1 200 "
while CakePHP needs 
"HTTP/1.1 200 Ok"
because preg_match() in code use + instead *
Add tests and fix issues with multiple trailing whitespaces.

Closes #3016
Merge branch 'http-response-code' into master.

Merge changes from #3016 into master.

Closes #3016