0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00

Rename cowboy_http_protocol to cowboy_protocol

This commit is contained in:
Loïc Hoguin 2012-08-27 12:58:04 +02:00
parent cc2e084d45
commit 9e2622becb
5 changed files with 6 additions and 6 deletions

View file

@ -24,14 +24,14 @@
start_http(Ref, NbAcceptors, TransOpts, ProtoOpts) start_http(Ref, NbAcceptors, TransOpts, ProtoOpts)
when is_integer(NbAcceptors), NbAcceptors > 0 -> when is_integer(NbAcceptors), NbAcceptors > 0 ->
ranch:start_listener(Ref, NbAcceptors, ranch:start_listener(Ref, NbAcceptors,
ranch_tcp, TransOpts, cowboy_http_protocol, ProtoOpts). ranch_tcp, TransOpts, cowboy_protocol, ProtoOpts).
%% @doc Start an HTTPS listener. %% @doc Start an HTTPS listener.
-spec start_https(any(), non_neg_integer(), any(), any()) -> {ok, pid()}. -spec start_https(any(), non_neg_integer(), any(), any()) -> {ok, pid()}.
start_https(Ref, NbAcceptors, TransOpts, ProtoOpts) start_https(Ref, NbAcceptors, TransOpts, ProtoOpts)
when is_integer(NbAcceptors), NbAcceptors > 0 -> when is_integer(NbAcceptors), NbAcceptors > 0 ->
ranch:start_listener(Ref, NbAcceptors, ranch:start_listener(Ref, NbAcceptors,
ranch_ssl, TransOpts, cowboy_http_protocol, ProtoOpts). ranch_ssl, TransOpts, cowboy_protocol, ProtoOpts).
%% @doc Stop a listener. %% @doc Stop a listener.
-spec stop_listener(any()) -> ok. -spec stop_listener(any()) -> ok.

View file

@ -173,7 +173,7 @@
-include("http.hrl"). -include("http.hrl").
-include_lib("kernel/include/file.hrl"). -include_lib("kernel/include/file.hrl").
%% cowboy_http_protocol callbacks %% cowboy_protocol callbacks
-export([init/3]). -export([init/3]).
%% cowboy_http_rest callbacks %% cowboy_http_rest callbacks

View file

@ -138,7 +138,7 @@ upgrade_error(Req) ->
Req#http_req{resp_state=waiting}), Req#http_req{resp_state=waiting}),
closed. closed.
%% @see cowboy_http_protocol:ensure_response/1 %% @see cowboy_protocol:ensure_response/1
-spec upgrade_denied(#http_req{}) -> closed. -spec upgrade_denied(#http_req{}) -> closed.
upgrade_denied(#http_req{resp_state=done}) -> upgrade_denied(#http_req{resp_state=done}) ->
closed; closed;

View file

@ -32,7 +32,7 @@
%% %%
%% @see cowboy_dispatcher %% @see cowboy_dispatcher
%% @see cowboy_http_handler %% @see cowboy_http_handler
-module(cowboy_http_protocol). -module(cowboy_protocol).
%% API. %% API.
-export([start_link/4]). -export([start_link/4]).

View file

@ -489,7 +489,7 @@ http10_hostless(Config) ->
Name = list_to_atom("http10_hostless_" ++ integer_to_list(Port10)), Name = list_to_atom("http10_hostless_" ++ integer_to_list(Port10)),
ranch:start_listener(Name, 5, ranch:start_listener(Name, 5,
?config(transport, Config), ?config(opts, Config) ++ [{port, Port10}], ?config(transport, Config), ?config(opts, Config) ++ [{port, Port10}],
cowboy_http_protocol, [ cowboy_protocol, [
{dispatch, [{'_', [ {dispatch, [{'_', [
{[<<"http1.0">>, <<"hostless">>], http_handler, []}]}]}, {[<<"http1.0">>, <<"hostless">>], http_handler, []}]}]},
{max_keepalive, 50}, {max_keepalive, 50},