From e4124de2c71564d37b3732ede0fe1542de1d6f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 27 Aug 2012 11:50:35 +0200 Subject: Switch to Ranch for connection handling This is the first of many API incompatible changes. You have been warned. --- src/cowboy_http_protocol.erl | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/cowboy_http_protocol.erl') diff --git a/src/cowboy_http_protocol.erl b/src/cowboy_http_protocol.erl index f6c5a34..d65127d 100644 --- a/src/cowboy_http_protocol.erl +++ b/src/cowboy_http_protocol.erl @@ -33,7 +33,6 @@ %% @see cowboy_dispatcher %% @see cowboy_http_handler -module(cowboy_http_protocol). --behaviour(cowboy_protocol). -export([start_link/4]). %% API. -export([init/4, parse_request/1, handler_loop/3]). %% FSM. @@ -85,7 +84,7 @@ init(ListenerPid, Socket, Transport, Opts) -> Timeout = proplists:get_value(timeout, Opts, 5000), URLDecDefault = {fun cowboy_http:urldecode/2, crash}, URLDec = proplists:get_value(urldecode, Opts, URLDecDefault), - ok = cowboy:accept_ack(ListenerPid), + ok = ranch:accept_ack(ListenerPid), wait_request(#state{listener=ListenerPid, socket=Socket, transport=Transport, dispatch=Dispatch, max_empty_lines=MaxEmptyLines, max_keepalive=MaxKeepalive, max_line_length=MaxLineLength, -- cgit v1.2.3