Skip to content

Commit

Permalink
Fixed type declarations after running dialyzer on ewgi application.
Browse files Browse the repository at this point in the history
  • Loading branch information
dLuna committed Oct 29, 2010
1 parent b487644 commit 54f2c46
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion include/ewgi.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
-type ewgi_status() :: {integer(), string()}.

%% @type ewgi_message_body() = binary() | iolist() | stream() | {'file', string()}
-type ewgi_message_body() :: binary() | iolist() | stream() | {'file', string()}.
-type ewgi_message_body() :: binary() | iolist() | stream() |
{'file', string()} | {}.

%% @type ewgi_header_list() = [{ewgi_header_key(), ewgi_header_val()}]
-type ewgi_header_list() :: [{ewgi_header_key(), ewgi_header_val()}].
Expand Down
2 changes: 1 addition & 1 deletion src/server_gateways/ewgi_yaws.erl
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ headers(#arg{headers=H}, _Opts, R0) ->

input(#arg{clidata=D}, _Opts, R) ->
F = ewgi_util:read_bin_input(D),
ewgi:read_input(F, R).
ewgi:input(F, R).

errors(#arg{}, _Opts, R) ->
ewgi:errors(fun error_logger:error_report/1, R).
2 changes: 1 addition & 1 deletion src/utils/ewgi_util_cookie.erl
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ simple_cookie(Name, Val, Path, Sec) when is_list(Name), is_list(Val), is_list(Pa
Exp = case Val of [] -> ?COOKIE_DELETE_TRAILER; _ -> [] end,
{"Set-Cookie", [Name, $=, Val, "; Path=", Path, S, Exp]}.

-spec simple_cookie(string(), binary() | string(), boolean(), binary() | string(), string()) -> {string(), iolist()}.
-spec simple_cookie(string(), binary() | string(), string(), boolean(), binary()| string()) -> {string(), iolist()}.
simple_cookie(Name, Val, Path, Sec, Domain) when is_binary(Val) ->
simple_cookie(Name, binary_to_list(Val), Path, Sec, Domain);
simple_cookie(Name, Val, Path, Sec, Domain) when is_binary(Domain) ->
Expand Down
2 changes: 1 addition & 1 deletion src/utils/ewgi_util_crypto.erl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
-author('Davide Marquês <nesrait@gmail.com>').

-define(MAX_SIZE, 4096). %% Most browsers only allow 4K of cookies
-define(MAX_SIZE_REPR, ?MAX_SIZE/2). %% Assume a 2-character representation of each byte in the final cookie.
-define(MAX_SIZE_REPR, ?MAX_SIZE div 2). %% Assume a 2-character representation of each byte in the final cookie.

-export([encode/2, encode/3, decode/2]).

Expand Down

0 comments on commit 54f2c46

Please sign in to comment.