Skip to content

Commit

Permalink
Update Socket.php
Browse files Browse the repository at this point in the history
  • Loading branch information
walkor committed May 24, 2016
1 parent 336d6cf commit 7efc5cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Socket.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,20 @@ public function __destruct()
public function buildHandshake()
{
//todo check this->request->_query
$info = parse_url($this->request->url);
$info = !empty($this->request->url) ? parse_url($this->request->url) : array();
$query = array();
if(isset($info['query']))
{
parse_str($info['query'], $query);
}
return array(
'headers' => $this->request->headers,
'headers' => isset($this->request->headers) ? $this->request->headers : array(),
'time'=> date('D M d Y H:i:s') . ' GMT',
'address'=> $this->conn->remoteAddress,
'xdomain'=> isset($this->request->headers['origin']),
'secure' => !empty($this->request->connection->encrypted),
'issued' => time(),
'url' => $this->request->url,
'url' => isset($this->request->url) ? $this->request->url : '',
'query' => $query,
);
}
Expand Down

0 comments on commit 7efc5cb

Please sign in to comment.