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

Roberto Ostinelli roberto@REDACTED
Tue Apr 20 18:04:31 CEST 2010


2010/4/19 Ingela Andin <ingela@REDACTED>:
> Hi!
>
> We recently accepted a patch for http packet mode e.i:
> http://github.com/erlang/otp/commit/12da3796463c7d02999985ae15e98dcaa4d2bdb4
>
> Do you have that patch? The offical ssl-release ssl-3.11 where this
> patch has been
> included is not yet released other then to git-repository.
>
> Regards Ingela Erlang/OTP team, Ericsson AB

hi ingela,

no i do not have this patch but i've decided to go for the httpd
option in ssl. however, there's still a question i need to solve.

1.
in https mode [ssl:transport_accept/1 + ssl:ssl_accept/1], if i
receive a http request, i get a {error, closed} message, i.e. a socket
is not created, thus the browser timeouts waiting for a response.

2.
in http mode [gen_tcp:accept/1], if i receive a https request then i get a
{http, Sock, {http_error, [22,3,1,0,157,1,0,0, ......]}} message, i.e.
the socket is created but the data is not understood.

i would like to respond with a 403 error in case 1 and a 404 error in case 2.

what is the best way to handle this?

thank you,

r.


More information about the erlang-questions mailing list