Skip to content

Commit

Permalink
minor indentation and comment cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
vinoski committed Dec 19, 2009
1 parent 762a73d commit 790ce8a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
11 changes: 6 additions & 5 deletions src/yaws_config.erl
Expand Up @@ -1781,17 +1781,18 @@ find_sc(_SC,[]) ->
verify_upgrade_args(GC, Groups0) when is_record(GC, gconf) ->
case is_groups(Groups0) of
true ->
%% embeded code may give appmods as a list of strings
%% So the above is for backwards compatibility
%% appmods should be {StringPathElem, ModAtom} or {StringPathElem,ModAtom,ExcludePathsList} tuples
%% Embedded code may give appmods as a list of strings, or
%% appmods can be {StringPathElem,ModAtom} or
%% {StringPathElem,ModAtom,ExcludePathsList} tuples. Handle
%% all possible variants here.
Groups = yaws:deepmap(
fun(SC) ->
SC#sconf{appmods =
lists:map(
fun({PE, Mod}) ->
{PE, Mod};
({PE,Mod,Ex}) ->
{PE,Mod,Ex};
({PE,Mod,Ex}) ->
{PE,Mod,Ex};
(AM) when is_list(AM) ->
{AM,list_to_atom(AM)};
(AM) when is_atom(AM) ->
Expand Down
21 changes: 10 additions & 11 deletions src/yaws_server.erl
Expand Up @@ -922,12 +922,13 @@ acceptor0(GS, Top) ->
ok
end,
Res = (catch aloop(Client, GS, 0)),
%% Skip closing the socket, as required by web sockets & stream processes.
%% Skip closing the socket, as required by web sockets & stream
%% processes.
CloseSocket = (get(outh) =:= undefined) orelse
(done_or_continue() =:= done),
case CloseSocket of
false -> ok;
true ->
false -> ok;
true ->
if
GS#gs.ssl == nossl ->
gen_tcp:close(Client);
Expand Down Expand Up @@ -2355,11 +2356,9 @@ deliver_dyn_part(CliSock, % essential params
no, undefined, stream),
wait_for_streamcontent_pid(Priv, CliSock, Pid);
{websocket, OwnerPid, SocketMode} ->
%% The handshake passes control over the socket to OwnerPid
%% and terminates the Yaws worker!
yaws_websockets:handshake(Arg, OwnerPid, SocketMode)
%% this point is never reached
;
%% The handshake passes control over the socket to OwnerPid
%% and terminates the Yaws worker!
yaws_websockets:handshake(Arg, OwnerPid, SocketMode);
_ ->
DeliverCont(Arg)
end.
Expand Down Expand Up @@ -2781,9 +2780,9 @@ handle_out_reply({streamcontent_from_pid, MimeType, Pid},
{streamcontent_from_pid, MimeType, Pid};

handle_out_reply({websocket, _OwnerPid, _SocketMode}=Reply,
_LineNo,_YawsFile, _UT, _ARG) ->
yaws:accumulate_header({connection, erase}),
Reply;
_LineNo,_YawsFile, _UT, _ARG) ->
yaws:accumulate_header({connection, erase}),
Reply;

handle_out_reply({header, H}, _LineNo, _YawsFile, _UT, _ARG) ->
yaws:accumulate_header(H);
Expand Down

0 comments on commit 790ce8a

Please sign in to comment.