[erlang-questions] Re: ssl and {active, once} - bug?

Roberto Ostinelli <>
Mon Apr 19 15:03:52 CEST 2010

2010/4/19 Tony Rogvall <>:
> You must switch to http header packet processing !
> Use {packet, httph} or {packet,httph_bin} after the initial request.
> End of headers is signaled by http_eoh.
> After http_eoh you must switch to content processing {packet, 0} and then read possible content.
> The size of the content is givent by the header Content-Length or if chunked encoding is used
> the size given before each chunk.
> Hope this helps
> /Tony

hi tony,

well i am starting the server with the options:

	Options = [
		binary, {packet, http}, {reuseaddr, true}, {active, false},
		{backlog, 128}, {ssl_imp, new},
		{certfile, "/Users/roberto/Code/sslbug/server.pem"},
		{keyfile, "/Users/roberto/Code/sslbug/privkey.pem"},
		{password, "roberto"}

which does include {packet, http}. is this not enough? i normally
switch to {packet, 0} only when i go passive to read body of requests,
after eoh.


More information about the erlang-questions mailing list