[erlang-questions] gen_tcp, {packet, http}, and recieve buffer size

Ulf Wiger ulf@REDACTED
Fri Sep 29 09:44:49 CEST 2006


Den 2006-09-29 02:22:35 skrev Eric Merritt <cyberlync@REDACTED>:

> Guys,
>
>   I have a question about one of the undocumented features of gen_tcp.
> When using the http packet type in gen_tcp, parsing fails if data
> associated with the http get request is larger then the receive
> buffer. At least, after a bit of testing this looks like the problem
> we are seeing. Of course, this is just a prototype and not a
> production system so its no big deal, but it did kick in my curiosity.
> So is this a bug?

I'm just speculating here, but...

I guess that depends on how it fails. If it kills the whole VM,
it's a bug, but if it simply drops the packet, I'd say it's a
feature. The receive buffer is configurable, and one may well
be able to impose that kind of protection, in order to stop
people from sending huge packets as some sort of DoS attack
(sending chunked data ought to be a much better way to handle
very large data anyway.)

BR,
Ulf W

-- 
Ulf Wiger



More information about the erlang-questions mailing list