Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/json2.erl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
-author("Gaspar Chilingarov <nm@web.am>, Gurgen Tumanyan <barbarian@armkb.com>").
-author("Steve Vinoski <vinoski@ieee.org>").

-compile('nowarn_deprecated_catch').

%%% JavaScript Object Notation ("JSON", http://www.json.org) is a simple
%%% data syntax meant as a lightweight alternative to other representations,
%%% such as XML. JSON is natively supported by JavaScript, but many
Expand Down
2 changes: 2 additions & 0 deletions src/yaws.erl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
-module(yaws).
-author('klacke@bluetail.com').

-compile('nowarn_deprecated_catch').

-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_appdeps.hrl").
Expand Down
5 changes: 4 additions & 1 deletion src/yaws_api.erl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
-module(yaws_api).
-author('klacke@hyber.org').

-compile('nowarn_deprecated_catch').

-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").
Expand Down Expand Up @@ -1166,7 +1168,8 @@ reformat_header(H, FormatFun) ->
(Hdr, Acc) ->
[Hdr|Acc]
end, [],
lists:zf(fun({Hname, Str}) ->
lists:filtermap(
fun({Hname, Str}) ->
I = FormatFun(Hname, Str),
{true, I};
(undefined) ->
Expand Down
2 changes: 2 additions & 0 deletions src/yaws_appmod_dav.erl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

-module(yaws_appmod_dav).

-compile('nowarn_deprecated_catch').

%% for appmod:
-export([out/1]).

Expand Down
5 changes: 4 additions & 1 deletion src/yaws_cgi.erl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
-author('carsten@codimi.de').
-author('brunorijsman@hotmail.com'). %% Added support for FastCGI

-compile('nowarn_deprecated_catch').

-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").
-include("../include/yaws.hrl").
Expand Down Expand Up @@ -373,7 +375,8 @@ build_env(Arg, Scriptfilename, Pathinfo, ExtraEnv, SC) ->
Extra_CGI_Vars.

other_headers(Headers) ->
lists:zf(fun({http_header,_,Var,_,Val}) ->
lists:filtermap(
fun({http_header,_,Var,_,Val}) ->
case tohttp(Var) of
"HTTP_PROXY" ->
%% See http://httpoxy.org/
Expand Down
7 changes: 4 additions & 3 deletions src/yaws_config.erl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
-module(yaws_config).
-author('klacke@bluetail.com').

-compile('nowarn_deprecated_catch').

-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
Expand Down Expand Up @@ -3194,7 +3195,7 @@ ssl_start() ->
%% Return {Pid, SC, Scs} or false
%% Pairs is the pairs in yaws_server #state{}
search_sconf(GC, NewSC, Pairs) ->
case lists:zf(
case lists:filtermap(
fun({Pid, Scs = [SC|_]}) ->
case same_virt_srv(GC, NewSC, SC) of
true ->
Expand Down Expand Up @@ -3230,7 +3231,7 @@ search_group(GC, SC, Pairs) ->
end
end,

lists:zf(Fun, Pairs).
lists:filtermap(Fun, Pairs).


%% Return a new Pairs list with one SC updated
Expand All @@ -3250,7 +3251,7 @@ update_sconf(Gc, NewSc, Pos, Pairs) ->

%% return a new pairs list with SC removed
delete_sconf(Gc, OldSc, Pairs) ->
lists:zf(
lists:filtermap(
fun({Pid, Scs}) ->
case same_virt_srv(Gc, hd(Scs), OldSc) of
true ->
Expand Down
2 changes: 2 additions & 0 deletions src/yaws_ctl.erl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
-module(yaws_ctl).
-author('klacke@bluetail.com').

-compile('nowarn_deprecated_catch').

-include_lib("kernel/include/file.hrl").
-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
Expand Down
4 changes: 3 additions & 1 deletion src/yaws_debug.erl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
-module(yaws_debug).
-author('klacke@hyber.org').

-compile('nowarn_deprecated_catch').

-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").
Expand Down Expand Up @@ -203,7 +205,7 @@ xref([Dir]) ->


pids() ->
lists:zf(
lists:filtermap(
fun(P) ->
case process_info(P) of
L when is_list(L) ->
Expand Down
2 changes: 2 additions & 0 deletions src/yaws_jsonrpc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
-export([handler/2]).
-export([handler_session/2, handler_session/3]).

-compile('nowarn_deprecated_catch').

%%-define(debug, 1).
-include("yaws_debug.hrl").

Expand Down
1 change: 1 addition & 0 deletions src/yaws_log.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
-include_lib("kernel/include/file.hrl").
-include_lib("kernel/include/inet.hrl").

-compile('nowarn_deprecated_catch').

-behaviour(gen_server).

Expand Down
1 change: 1 addition & 0 deletions src/yaws_logger.erl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
-author('christopher@yakaz.com').
-include_lib("kernel/include/file.hrl").

-compile('nowarn_deprecated_catch').

%% API
-export([
Expand Down
8 changes: 5 additions & 3 deletions src/yaws_ls.erl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
-module(yaws_ls).
-author('klacke@hyber.org').

-compile('nowarn_deprecated_catch').

-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").
Expand All @@ -29,7 +31,7 @@ list_directory(Arg, CliSock, List, DirName, Req, DoAllZip) ->

Descriptions = read_descriptions(DirName),

L0 = lists:zf(
L0 = lists:filtermap(
fun(F) ->
File = DirName ++ [$/|F],
FI = file:read_file_info(File),
Expand Down Expand Up @@ -462,8 +464,8 @@ file_entry(_Err, _, _Name, _, _) ->

trim(L,N) ->
trim(L,N,[]).
trim([_H1,_H2,_H3]=[H|T], 3=I, Acc) ->
trim(T, I-1, [H|Acc]);
trim([H1,H2,H3], 3=I, Acc) ->
trim([H2,H3], I-1, [H1|Acc]);
trim([H1,H2,H3|_T], 3=_I, Acc) when H1 < 128, H2 < 128, H3 < 128 ->
lists:reverse(Acc) ++ "..&gt;";
trim([H1,H2,H3|_T], 3=_I, [H0|Acc]) ->
Expand Down
2 changes: 2 additions & 0 deletions src/yaws_revproxy.erl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
%%%-------------------------------------------------------------------
-module(yaws_revproxy).

-compile('nowarn_deprecated_catch').

-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
-include("yaws_debug.hrl").
Expand Down
2 changes: 2 additions & 0 deletions src/yaws_rpc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
-modified_by("Yariv Sadan <yarivvv@gmail.com>").
-modified_by("Steve Vinoski <vinoski@ieee.org>").

-compile('nowarn_deprecated_catch').

-export([handler/2]).
-export([handler_session/2, handler_session/3]).

Expand Down
2 changes: 2 additions & 0 deletions src/yaws_rss.erl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

-behaviour(gen_server).

-compile('nowarn_deprecated_catch').

%% External exports
-export([start/0, start_link/0, open/1, open/2, close/0, close/2,
insert/5, insert/6, insert/7, retrieve/2]).
Expand Down
2 changes: 2 additions & 0 deletions src/yaws_server.erl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
-module(yaws_server).
-author('klacke@hyber.org').

-compile('nowarn_deprecated_catch').

-behaviour(gen_server).
-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").
Expand Down
1 change: 1 addition & 0 deletions src/yaws_session_server.erl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
-module(yaws_session_server).
-author('klacke@hyber.org').

-compile('nowarn_deprecated_catch').

-behaviour(gen_server).

Expand Down
1 change: 1 addition & 0 deletions src/yaws_shaper.erl
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
-module(yaws_shaper).
-author('christopher@yakaz.com').

-compile('nowarn_deprecated_catch').

-export([behaviour_info/1]).

Expand Down
2 changes: 2 additions & 0 deletions src/yaws_soap_srv.erl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
%%%-------------------------------------------------------------------
-module(yaws_soap_srv).

-compile('nowarn_deprecated_catch').

-behaviour(gen_server).

%% API
Expand Down
2 changes: 2 additions & 0 deletions src/yaws_sse.erl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
-module(yaws_sse).
-author('vinoski@ieee.org').

-compile('nowarn_deprecated_catch').

-export([headers/1,
event/0, event/1,
data/0, data/1, data/2,
Expand Down
2 changes: 2 additions & 0 deletions src/yaws_vdir.erl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
-module(yaws_vdir).

-compile('nowarn_deprecated_catch').

-export([arg_rewrite/1]).

-include("../include/yaws_api.hrl").
Expand Down
2 changes: 2 additions & 0 deletions src/yaws_websockets.erl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
-author('jbothma@gmail.com').
-behaviour(gen_server).

-compile('nowarn_deprecated_catch').

-include("../include/yaws.hrl").
-include("../include/yaws_api.hrl").

Expand Down
2 changes: 2 additions & 0 deletions src/yaws_xmlrpc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
-export([handler/2]).
-export([handler_session/2, handler_session/3]).

-compile('nowarn_deprecated_catch').

%%-define(debug, 1).
%%-include("../../yaws/src/yaws_debug.hrl").

Expand Down