HTTP parser bug fix
This commit is contained in:
parent
0de53cf7ee
commit
1495354e7c
@ -186,7 +186,7 @@ class WebSocket implements ProtocolInterface {
|
|||||||
*/
|
*/
|
||||||
protected function http_parse_headers($http_message) {
|
protected function http_parse_headers($http_message) {
|
||||||
$retVal = array();
|
$retVal = array();
|
||||||
$fields = explode("br", preg_replace("%(<|/\>|>)%", "", nl2br($header)));
|
$fields = explode("br", preg_replace("%(<|/\>|>)%", "", nl2br($http_message)));
|
||||||
|
|
||||||
foreach ($fields as $field) {
|
foreach ($fields as $field) {
|
||||||
if (preg_match('%^(GET|POST|PUT|DELETE|PATCH)(\s)(.*)%', $field, $matchReq)) {
|
if (preg_match('%^(GET|POST|PUT|DELETE|PATCH)(\s)(.*)%', $field, $matchReq)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user