This repository was archived by the owner on Sep 20, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,6 +56,12 @@ class Server extends Connection
5656 */
5757 protected $ _request = null ;
5858
59+ /**
60+ * length of buffer used to extract header information
61+ *
62+ * @var int
63+ */
64+ protected $ headerLength = 2048 ;
5965
6066
6167 /**
@@ -80,6 +86,17 @@ public function __construct(
8086 return ;
8187 }
8288
89+ /**
90+ * Set length of buffer used to extract header information
91+ *
92+ * @param int $length
93+ * @return void
94+ */
95+ public function setHeaderBufferSize ($ length )
96+ {
97+ $ this ->headerLength = (int )$ length ;
98+ }
99+
83100 /**
84101 * Try the handshake by trying different protocol implementation.
85102 *
@@ -89,7 +106,7 @@ public function __construct(
89106 protected function doHandshake ()
90107 {
91108 $ connection = $ this ->getConnection ();
92- $ buffer = $ connection ->read (2048 );
109+ $ buffer = $ connection ->read ($ this -> headerLength );
93110 $ request = $ this ->getRequest ();
94111 $ request ->parse ($ buffer );
95112
You can’t perform that action at this time.
0 commit comments