[erlang-questions] gen_tcp very slow to fetch data

Chandru chandrashekhar.mullaparthi@REDACTED
Mon Nov 23 13:25:04 CET 2009

2009/11/23 zabrane Mikael <zabrane3@REDACTED>

> Hi Colm,
> Your assumption that the initial gen_tcp:recv will give you a binary
> > which always includes the full request headers is not correct.  If you
> > are going down that road you would need to write code to check for the
> > the header terminator and if it isn't present then buffer and read
> > more until you have the terminator.
> Ok. Finding headers terminator (teh double CRLF) isn't difficult.
> What's difficult for me is to find the request end?
> How can I know that I've read all data in my request (GET or POST)?
There is no easy answer I'm afraid! You just have to read RFC2616 :)


More information about the erlang-questions mailing list