Skip to content

Commit

Permalink
Use yaws_api:setcookie
Browse files Browse the repository at this point in the history
  • Loading branch information
ngocdaothanh committed Jul 22, 2009
1 parent 61f2a41 commit ea324e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/session/ale_session.erl
Expand Up @@ -55,11 +55,11 @@ session_id_value() ->
session_id_value(Value) ->
Value2 = case Value of
undefined -> random_session_id_value();

_ -> Value
_ -> Value
end,
SessionIdKey = session_id_key(),
ale_pd:yaws(header, {set_cookie, io_lib:format("~s=~s;", [SessionIdKey, Value2])}),
{header, SetCookieRec} = yaws_api:setcookie(SessionIdKey, Value2, "/"),
ale_pd:yaws(header, SetCookieRec),
ale_pd:ale(session_id_value, Value2).

%% Generates new session ID value, which should be unique.
Expand Down

0 comments on commit ea324e3

Please sign in to comment.