From 1495354e7c76a88bab930e269ddce0c23e8777c1 Mon Sep 17 00:00:00 2001 From: Chris Boden Date: Mon, 7 Nov 2011 10:17:39 -0500 Subject: [PATCH] HTTP parser bug fix --- lib/Ratchet/Protocol/WebSocket.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Ratchet/Protocol/WebSocket.php b/lib/Ratchet/Protocol/WebSocket.php index 5ca2ad6..b06b947 100644 --- a/lib/Ratchet/Protocol/WebSocket.php +++ b/lib/Ratchet/Protocol/WebSocket.php @@ -186,7 +186,7 @@ class WebSocket implements ProtocolInterface { */ protected function http_parse_headers($http_message) { $retVal = array(); - $fields = explode("br", preg_replace("%(<|/\>|>)%", "", nl2br($header))); + $fields = explode("br", preg_replace("%(<|/\>|>)%", "", nl2br($http_message))); foreach ($fields as $field) { if (preg_match('%^(GET|POST|PUT|DELETE|PATCH)(\s)(.*)%', $field, $matchReq)) {