anchor.diff:          done -> ok
       end.
   
  -process_result(AppInfo, Req, Result, SessionID) ->
  +process_result_and_add_session(AppInfo, RequestContext, Result) ->
  +    Req = proplists:get_value(request, RequestContext),
       {StatusCode, Headers, Payload} = process_result(AppInfo, Req, Result),
  -    Headers1 = case SessionID of
  +    Headers1 = case proplists:get_value(session_id, RequestContext) of
           undefined ->
               Headers;
  -        _ ->
  +        SessionID ->
               SessionExpTime = boss_session:get_session_exp_time(),
               CookieOptions = [{path, "/"}, {max_age, SessionExpTime}],
               CookieOptions2 = case boss_env:get_env(session_domain, undefined) of
  
positive.code:     Result3 = re:replace(Result2, "erlang.png", AppInfo#boss_app_info.base_url++AppInfo#boss_app_info.static_prefix++"/edoc/erlang.png", [{return,list}, global]),
      Result3.
  
  %% @desc generates HTLM output for errors. called from process_error/5
  %% (seems to be called on runtime error)
  render_error(Error, ExtraMessage, AppInfo, Req) ->
      case boss_html_error_template:render([{error, Error}, {extra_message, ExtraMessage}, 
                                            {request, Req},
                                            {appinfo, AppInfo},
                                            {'_base_url', AppInfo#boss_app_info.base_url},
                                            {'_static', AppInfo#boss_app_info.static_prefix}]) of
          {ok, Payload} ->
              {error, Payload, []};
          Err ->
              Err
      end.
  
  %% @desc generates HTLM output for errors. called from load_and_execute/5
  %% (seems to be called on parse error)
  render_errors(ErrorList, AppInfo, Req) ->
      case boss_html_errors_template:render([{errors, ErrorList}, 
                                             {request, Req},
                                             {'_base_url', AppInfo#boss_app_info.base_url},
                                             {'_static', AppInfo#boss_app_info.static_prefix}]) of
          {ok, Payload} ->
              {ok, Payload, []};
          Err ->
              Err
      end.
  
  execute_action(Location, AppInfo, Req, SessionID) ->
      execute_action(Location, AppInfo, Req, SessionID, []).
  
  execute_action({Controller, Action}, AppInfo, Req, SessionID, LocationTrail) ->
      execute_action({Controller, Action, []}, AppInfo, Req, SessionID, LocationTrail);
  execute_action({Controller, Action, Tokens}, AppInfo, Req, SessionID, LocationTrail) when is_atom(Action) ->
      execute_action({Controller, atom_to_list(Action), Tokens}, AppInfo, Req, SessionID, LocationTrail);
  execute_action({Controller, Action, Tokens} = Location, AppInfo, Req, SessionID, LocationTrail) ->
      case lists:member(Location, LocationTrail) of
          true ->
              {{error, "Circular redirect!"}, SessionID};
  
negative.code: 
              Result = case AuthInfo of
                  {ok, Info} ->
                      execute_action1(Adapter, AdapterInfo, Info, Location, AppInfo, [{request, Req}, {session_id, SessionID1}], LocationTrail);
                  {redirect, Where} ->
                      {redirect, process_redirect(Controller, Where, AppInfo)}
              end,
  