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

Ingela Andin ingela.andin@REDACTED
Wed Apr 21 12:10:13 CEST 2010


Hi!

2010/4/20 Roberto Ostinelli <roberto@REDACTED>:
> 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

Without the patch you need to switch headeras as Tony said with new ssl.

> but i've decided to go for the httpd
> option in ssl.

Sorry I do not  understand what you mean by that?

> 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?

Are you writing your own http server? Could you explain more what yoy
are trying to do?

Regards  Ingela Erlang OTP team  Ericsson AB


More information about the erlang-questions mailing list