[erlang-questions] Cowboy: is it possible to detect that request is http and redirect to https?

Loïc Hoguin essen@REDACTED
Thu Feb 27 17:46:22 CET 2014


Sure there is, it's just undocumented. Try it, gen_tcp:unrecv(Socket, Data).

On 02/27/2014 05:43 PM, Max Lapshin wrote:
> Yes, such smart things by guessing if first bytes are http or ssl.
>
> But there is no gen_tcp:unrecv :(

-- 
Loïc Hoguin
http://ninenines.eu



More information about the erlang-questions mailing list