mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Fix typos
This commit is contained in:
parent
2a08250499
commit
abc895c6c8
13 changed files with 22 additions and 22 deletions
|
@ -64,7 +64,7 @@ experimental.
|
||||||
* Add automatic handling of range requests to REST handlers
|
* Add automatic handling of range requests to REST handlers
|
||||||
that return the callback `auto` from `ranges_accepted/2`.
|
that return the callback `auto` from `ranges_accepted/2`.
|
||||||
Cowboy will call the configured `ProvideCallback` and
|
Cowboy will call the configured `ProvideCallback` and
|
||||||
then split the ouput automatically for the ranged response.
|
then split the output automatically for the ranged response.
|
||||||
|
|
||||||
* Enable range requests support in `cowboy_static`.
|
* Enable range requests support in `cowboy_static`.
|
||||||
|
|
||||||
|
|
|
@ -52,11 +52,11 @@ HTTP/1.1 will initialize a stream only when the request-line
|
||||||
and all headers have been received. When errors occur before
|
and all headers have been received. When errors occur before
|
||||||
that point Cowboy will call the callback `early_error/5`
|
that point Cowboy will call the callback `early_error/5`
|
||||||
with a partial request, the error reason and the response
|
with a partial request, the error reason and the response
|
||||||
Cowboy intends to send. All other events go throuh the
|
Cowboy intends to send. All other events go through the
|
||||||
stream handler using the normal callbacks.
|
stream handler using the normal callbacks.
|
||||||
|
|
||||||
HTTP/2 will initialize the stream when the `HEADERS` block has
|
HTTP/2 will initialize the stream when the `HEADERS` block has
|
||||||
been fully received and decoded. Any protocol error occuring
|
been fully received and decoded. Any protocol error occurring
|
||||||
before that will not result in a response being sent and
|
before that will not result in a response being sent and
|
||||||
will therefore not go through the stream handler. In addition
|
will therefore not go through the stream handler. In addition
|
||||||
Cowboy may terminate streams without sending an HTTP response
|
Cowboy may terminate streams without sending an HTTP response
|
||||||
|
@ -278,7 +278,7 @@ This can also be used to override stream handler
|
||||||
options. For example this is supported by
|
options. For example this is supported by
|
||||||
link:man:cowboy_compress_h(3)[cowboy_compress_h(3)].
|
link:man:cowboy_compress_h(3)[cowboy_compress_h(3)].
|
||||||
|
|
||||||
Not all options can be overriden. Please consult the
|
Not all options can be overridden. Please consult the
|
||||||
relevant option's documentation for details.
|
relevant option's documentation for details.
|
||||||
|
|
||||||
== Predefined events
|
== Predefined events
|
||||||
|
|
|
@ -126,7 +126,7 @@ timeout::
|
||||||
received first.
|
received first.
|
||||||
|
|
||||||
{error, Reason}::
|
{error, Reason}::
|
||||||
A socket error ocurred.
|
A socket error occurred.
|
||||||
|
|
||||||
== Types
|
== Types
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ features understood or safely ignored by HTTP/1.0 clients. (RFC7230 A)
|
||||||
|
|
||||||
It is recommended to limit the request-line length to a configurable
|
It is recommended to limit the request-line length to a configurable
|
||||||
limit of at least 8000 octets. However, as the possible line length is
|
limit of at least 8000 octets. However, as the possible line length is
|
||||||
highly dependent on what form the request-target takes, it is preferrable
|
highly dependent on what form the request-target takes, it is preferable
|
||||||
to limit each individual components of the request-target. (RFC7230 3.1.1)
|
to limit each individual components of the request-target. (RFC7230 3.1.1)
|
||||||
|
|
||||||
A request line too long must be rejected with a 414 status code
|
A request line too long must be rejected with a 414 status code
|
||||||
|
|
2
erlang.mk
vendored
2
erlang.mk
vendored
|
@ -627,7 +627,7 @@ pkg_check_node_commit = master
|
||||||
|
|
||||||
PACKAGES += chronos
|
PACKAGES += chronos
|
||||||
pkg_chronos_name = chronos
|
pkg_chronos_name = chronos
|
||||||
pkg_chronos_description = Timer module for Erlang that makes it easy to abstact time out of the tests.
|
pkg_chronos_description = Timer module for Erlang that makes it easy to abstract time out of the tests.
|
||||||
pkg_chronos_homepage = https://github.com/lehoff/chronos
|
pkg_chronos_homepage = https://github.com/lehoff/chronos
|
||||||
pkg_chronos_fetch = git
|
pkg_chronos_fetch = git
|
||||||
pkg_chronos_repo = https://github.com/lehoff/chronos
|
pkg_chronos_repo = https://github.com/lehoff/chronos
|
||||||
|
|
|
@ -317,7 +317,7 @@ parse_list(Type, [{{Type, P}, _} | T], R, I, A, Wrap) ->
|
||||||
NewWrap2 =
|
NewWrap2 =
|
||||||
case T of
|
case T of
|
||||||
[] ->
|
[] ->
|
||||||
false; % doesnt matter
|
false; % doesn't matter
|
||||||
[H2 | _T2] ->
|
[H2 | _T2] ->
|
||||||
case H2 of
|
case H2 of
|
||||||
{linefeed, _} ->
|
{linefeed, _} ->
|
||||||
|
@ -333,7 +333,7 @@ parse_list(_Type, List, _R, _I, A, _) ->
|
||||||
{List, lists:reverse(A)}.
|
{List, lists:reverse(A)}.
|
||||||
|
|
||||||
%% grab grabs normals, double codeblocks, linefeeds and blanks
|
%% grab grabs normals, double codeblocks, linefeeds and blanks
|
||||||
%% BUT stop grabbing if a normal if preceeded by a linefeed or blank
|
%% BUT stop grabbing if a normal if preceded by a linefeed or blank
|
||||||
%% UNLESS the normal starts with white space :(
|
%% UNLESS the normal starts with white space :(
|
||||||
%% the third return parameter is 'true' if the 'li' should be
|
%% the third return parameter is 'true' if the 'li' should be
|
||||||
%% wrapped in '<p></p>' and false if it shouldn't
|
%% wrapped in '<p></p>' and false if it shouldn't
|
||||||
|
@ -768,8 +768,8 @@ type_ol1(_List, _Acc) ->
|
||||||
%% '### blah' is fine
|
%% '### blah' is fine
|
||||||
%% '### blah ###' is reduced to '### blah' because trailing #'s are
|
%% '### blah ###' is reduced to '### blah' because trailing #'s are
|
||||||
%% just for show but...
|
%% just for show but...
|
||||||
%% '##' is like appling '#' to '#' <-- applying 1 less styling to a single #
|
%% '##' is like applying '#' to '#' <-- applying 1 less styling to a single #
|
||||||
%% and '###' is like appling '##' to '#' etc, etc
|
%% and '###' is like applying '##' to '#' etc, etc
|
||||||
%% but after you hit 6#'s you just get this for a single hash
|
%% but after you hit 6#'s you just get this for a single hash
|
||||||
%% ie '#############' is like applying '######' to a single '#'
|
%% ie '#############' is like applying '######' to a single '#'
|
||||||
%% but/and '######## blah' is like apply '######' to '## blah'
|
%% but/and '######## blah' is like apply '######' to '## blah'
|
||||||
|
|
|
@ -108,7 +108,7 @@
|
||||||
opts = #{} :: cowboy:opts(),
|
opts = #{} :: cowboy:opts(),
|
||||||
buffer = <<>> :: binary(),
|
buffer = <<>> :: binary(),
|
||||||
|
|
||||||
%% Some options may be overriden for the current stream.
|
%% Some options may be overridden for the current stream.
|
||||||
overriden_opts = #{} :: cowboy:opts(),
|
overriden_opts = #{} :: cowboy:opts(),
|
||||||
|
|
||||||
%% Remote address and port for the connection.
|
%% Remote address and port for the connection.
|
||||||
|
@ -289,7 +289,7 @@ set_timeout(State0=#state{opts=Opts, overriden_opts=Override}, Name) ->
|
||||||
idle_timeout -> 60000
|
idle_timeout -> 60000
|
||||||
end,
|
end,
|
||||||
Timeout = case Override of
|
Timeout = case Override of
|
||||||
%% The timeout may have been overriden for the current stream.
|
%% The timeout may have been overridden for the current stream.
|
||||||
#{Name := Timeout0} -> Timeout0;
|
#{Name := Timeout0} -> Timeout0;
|
||||||
_ -> maps:get(Name, Opts, Default)
|
_ -> maps:get(Name, Opts, Default)
|
||||||
end,
|
end,
|
||||||
|
@ -984,7 +984,7 @@ commands(State0=#state{flow=Flow0}, StreamID, [{flow, Size}|Tail]) ->
|
||||||
Flow0 < 0 -> Size;
|
Flow0 < 0 -> Size;
|
||||||
true -> Flow0 + Size
|
true -> Flow0 + Size
|
||||||
end,
|
end,
|
||||||
%% Reenable active mode if necessary.
|
%% Re-enable active mode if necessary.
|
||||||
State = if
|
State = if
|
||||||
Flow0 =< 0, Flow > 0 ->
|
Flow0 =< 0, Flow > 0 ->
|
||||||
active(State0);
|
active(State0);
|
||||||
|
@ -1288,7 +1288,7 @@ stream_terminate(State0=#state{opts=Opts, in_streamid=InStreamID, in_state=InSta
|
||||||
_ -> %% done or Version =:= 'HTTP/1.0'
|
_ -> %% done or Version =:= 'HTTP/1.0'
|
||||||
State0
|
State0
|
||||||
end,
|
end,
|
||||||
%% Stop the stream, shutdown children and reset overriden options.
|
%% Stop the stream, shutdown children and reset overridden options.
|
||||||
{value, #stream{state=StreamState}, Streams}
|
{value, #stream{state=StreamState}, Streams}
|
||||||
= lists:keytake(StreamID, #stream.id, Streams1),
|
= lists:keytake(StreamID, #stream.id, Streams1),
|
||||||
stream_call_terminate(StreamID, Reason, StreamState, State1),
|
stream_call_terminate(StreamID, Reason, StreamState, State1),
|
||||||
|
|
|
@ -554,7 +554,7 @@ match_media_type_params(Req, State, Accept,
|
||||||
%% When we match against a wildcard, the media type is text
|
%% When we match against a wildcard, the media type is text
|
||||||
%% and has a charset parameter, we call charsets_provided
|
%% and has a charset parameter, we call charsets_provided
|
||||||
%% and check that the charset is provided. If the callback
|
%% and check that the charset is provided. If the callback
|
||||||
%% is not exported, we accept inconditionally but ignore
|
%% is not exported, we accept unconditionally but ignore
|
||||||
%% the given charset so as to not send a wrong value back.
|
%% the given charset so as to not send a wrong value back.
|
||||||
case call(Req, State, charsets_provided) of
|
case call(Req, State, charsets_provided) of
|
||||||
no_call ->
|
no_call ->
|
||||||
|
|
|
@ -159,7 +159,7 @@ do_default(Req=#{qs := <<"moved_permanently">>}, State, previously_existed) ->
|
||||||
{true, Req, State};
|
{true, Req, State};
|
||||||
do_default(Req=#{qs := <<"moved_temporarily">>}, State, previously_existed) ->
|
do_default(Req=#{qs := <<"moved_temporarily">>}, State, previously_existed) ->
|
||||||
{true, Req, State};
|
{true, Req, State};
|
||||||
%% We need the DELETE to suceed to reach this callback.
|
%% We need the DELETE to succeed to reach this callback.
|
||||||
do_default(Req=#{qs := <<"delete_completed">>}, State, delete_resource) ->
|
do_default(Req=#{qs := <<"delete_completed">>}, State, delete_resource) ->
|
||||||
{true, Req, State};
|
{true, Req, State};
|
||||||
%% We should never reach these callbacks.
|
%% We should never reach these callbacks.
|
||||||
|
|
|
@ -160,7 +160,7 @@ do_default(Req=#{qs := <<"moved_permanently">>}, State, previously_existed) ->
|
||||||
{true, Req, State};
|
{true, Req, State};
|
||||||
do_default(Req=#{qs := <<"moved_temporarily">>}, State, previously_existed) ->
|
do_default(Req=#{qs := <<"moved_temporarily">>}, State, previously_existed) ->
|
||||||
{true, Req, State};
|
{true, Req, State};
|
||||||
%% We need the DELETE to suceed to reach this callback.
|
%% We need the DELETE to succeed to reach this callback.
|
||||||
do_default(Req=#{qs := <<"delete_completed">>}, State, delete_resource) ->
|
do_default(Req=#{qs := <<"delete_completed">>}, State, delete_resource) ->
|
||||||
{true, Req, State};
|
{true, Req, State};
|
||||||
%% We should never reach these callbacks.
|
%% We should never reach these callbacks.
|
||||||
|
|
|
@ -127,7 +127,7 @@ do_accept_callback_true(Config, Fun) ->
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
charset_in_content_types_provided(Config) ->
|
charset_in_content_types_provided(Config) ->
|
||||||
doc("When a charset is matched explictly in content_types_provided, "
|
doc("When a charset is matched explicitly in content_types_provided, "
|
||||||
"that charset is used and the charsets_provided callback is ignored."),
|
"that charset is used and the charsets_provided callback is ignored."),
|
||||||
ConnPid = gun_open(Config),
|
ConnPid = gun_open(Config),
|
||||||
Ref = gun:get(ConnPid, "/charset_in_content_types_provided", [
|
Ref = gun:get(ConnPid, "/charset_in_content_types_provided", [
|
||||||
|
|
|
@ -289,7 +289,7 @@ must_understand_origin_form(Config) ->
|
||||||
"Host: localhost\r\n"
|
"Host: localhost\r\n"
|
||||||
"\r\n").
|
"\r\n").
|
||||||
|
|
||||||
%% @todo Reenable this test once support for CONNECT is added.
|
%% @todo Re-enable this test once support for CONNECT is added.
|
||||||
%origin_form_reject_if_connect(Config) ->
|
%origin_form_reject_if_connect(Config) ->
|
||||||
% doc("origin-form is used when the client does not connect to a proxy, "
|
% doc("origin-form is used when the client does not connect to a proxy, "
|
||||||
% "does not use the CONNECT method and does not issue a site-wide "
|
% "does not use the CONNECT method and does not issue a site-wide "
|
||||||
|
|
|
@ -399,11 +399,11 @@ accept_handshake_when_enabled(Config) ->
|
||||||
|
|
||||||
%% Closing a Websocket stream.
|
%% Closing a Websocket stream.
|
||||||
|
|
||||||
% The HTTP/2 stream closure is also analagous to the TCP connection closure of
|
% The HTTP/2 stream closure is also analogous to the TCP connection closure of
|
||||||
% [RFC6455]. Orderly TCP level closures are represented as END_STREAM
|
% [RFC6455]. Orderly TCP level closures are represented as END_STREAM
|
||||||
% ([RFC7540] Section 6.1) flags and RST exceptions are represented with
|
% ([RFC7540] Section 6.1) flags and RST exceptions are represented with
|
||||||
% the RST_STREAM ([RFC7540] Section 6.4) frame with the CANCEL
|
% the RST_STREAM ([RFC7540] Section 6.4) frame with the CANCEL
|
||||||
% ([RFC7540] Secion 7) error code.
|
% ([RFC7540] Section 7) error code.
|
||||||
|
|
||||||
%% @todo client close frame with END_STREAM
|
%% @todo client close frame with END_STREAM
|
||||||
%% @todo server close frame with END_STREAM
|
%% @todo server close frame with END_STREAM
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue