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

Tony Rogvall <>
Mon Apr 19 14:52:53 CEST 2010


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


On 19 apr 2010, at 13.22, Roberto Ostinelli wrote:

> this is the sequence of the first messages received by the controlling
> process in a SSL socket [new implementation] when {active, once} is
> used, and a browser performs a request:
> 
> {ssl,{sslsocket,new_ssl,<0.51.0>},
> 	{http_request,'GET',{abs_path,"/"},{1,1}}}
> {ssl,{sslsocket,new_ssl,<0.51.0>},
> 	{http_error,"Host: localhost:8080\r\n"}}
> {ssl,{sslsocket,new_ssl,<0.51.0>},
> 	{http_error,"User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X
> 10.6; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3\r\n"}}
> {ssl,{sslsocket,new_ssl,<0.51.0>},
> 	{http_error,"Accept:
> text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n"}}
> ...
> 
> therefore it seems that all incoming headers are actually treated as
> 'http_error' instead of 'http_header'.
> 
> is this intentional, something i am unaware of re the ssl modality, a
> bug, a mis-configuration, ...?
> 
> thank you in advance for any help.
> 
> r.
> 
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:
> 



More information about the erlang-questions mailing list