Open Pierozi opened 8 years ago
I guess this is better to increase it to 4092
. If it fixes the issue in #72, then this is good enough, and then we will address this issue in Hoa\Http
. This is the cleaner solution. Thoughts?
I don't know, @hhxsv5 use cookie encrypted, that depend of the encryption use. 2048 seems to me already big, even with huge Authorization token. Can we have consequences if we increase the value ? apart from memory footprint on variable.
I think it's better to read stream until we get header "sec-websocket-key" or eof.
other websocket projects: https://github.com/Textalk/websocket-php/blob/master/lib/Server.php#L76 https://github.com/vakata/websocket/blob/master/src/Base.php#L96
Hi @hhxsv5, the question was not how parse the header, but have enough data.
In your example, they dump the entries content of stream into local variable $request
.
In our case, it is Hoa\Http
responsible to parse header.
But library do not accept yet stream as argument.
It is not acceptable for us to dump entire stream content, because it's a stream... we only want here extract header part.
There as two option :
4096
or 8192
for sure to cover your long key.Hoa\Http
with PSR-7Can we increase it to the maximum TCP frame size? 4096 is way too low for my needs. Thanks!
I think we should really revamp the Hoa\Http
library. However, a temporary non-breaking patch would be to increase it to 4096.
@Pierozi Could you just increase the size to 4096 in #74, without the addition of new methods. Thanks!
@Hywan Ok I will do that, I also think it's for the best at this time.
what ??? Not fixed yet... wasted hours looking for problems
Refer to issue #72
Today the library will take arbitrary first 2048 bytes of stream and send them to Http library. Until we design better interface on
Hoa\Http
we can still make the buffer size configurable.Did we implement this parameter with Hoa\Zformat and array as argument of constructor ?