From 328a918ade7cf765ff8b1249241a2e80beeac927 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Fri, 2 Jul 2010 11:11:30 -0400 Subject: ugly dual-compatibility for ours/apache's _session formats --- src/chttpd_auth.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/chttpd_auth.erl b/src/chttpd_auth.erl index 4add8ebd..33b6d176 100644 --- a/src/chttpd_auth.erl +++ b/src/chttpd_auth.erl @@ -154,7 +154,8 @@ handle_session_req(#httpd{method='GET', user_ctx=UserCtx}=Req) -> {null, "true"} -> throw({unauthorized, <<"Please login.">>}); _False -> - send_json(Req, {[{ok,true}, {name,Name}, {roles,Roles}]}) + Props = [{name,Name}, {roles,Roles}], + send_json(Req, {[{ok,true}, {userCtx, {Props}} | Props]}) end; handle_session_req(#httpd{method='DELETE'}=Req) -> % logout -- cgit v1.2.3