Hi Mansur,

> Maybe it's possible to use SO_RCVLOWAT/SO_SNDLOWAT socket options? 

As far as I understand it, this should not be necessary (see below).


> Or maybe server side should do some "reassembly" (with a little
> timeouts to prevent DoS attacks) to get whole line of the request

Yes, this is what the change from Mar 20th does.

It is the new function rdLine(), which reads from the socket until at
least a full line is received. It does so on the _receiving_ side of
httpGate, i.e. on the way from the browser to httpGate.


But your description seems to refer to the _sending_ side of httpGate.

There is no special handling on the sending side, i.e. from httpGate to
the PicoLisp process, because here plain TCP (without SSL encryption) is
used and thus the 'line' function should be safe to receive the complete
line.


> 2) with httpGate
> ! L
> -> ("G" "E" "T" " " "/")
> 
> If I understand correctly, (line) immediatly returns first TCP packet
> value. I'm not expert in TCP/IP programming, maybe reason is FreeBSD
> itself?

As I understand it, 'line' should not be concerned about TCP packets.
These are on a lower level. PicoLisp reads from a socket, and should
receive either correct data or EOF, but never partial data. It is a
principle of TCP to handle this.

So I must say I have no clue at the moment ... Do you have an idea how
to further debug this?

♪♫ Alex
-- 
UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe

Reply via email to