anchor.diff:      end.
   
   process_request(#boss_app_info{ doc_prefix = DocPrefix } = AppInfo, Req, development, DocPrefix) ->
  -    {Result, SessionID1} = case catch load_and_execute(development, {"doc", [], []}, AppInfo, Req, undefined) of
  +    {Result, SessionID1} = case catch load_and_execute(development, {"doc", [], []}, AppInfo, [{request, Req}]) of
           {'EXIT', Reason} ->
               {{error, Reason}, generate_session_id(Req)};
           {R, S} ->
               {R, S}
       end,
  -    process_result(AppInfo, Req, Result, SessionID1);
  +    process_result_and_add_session(AppInfo, [{request, Req}, {session_id, SessionID1}], Result);
   process_request(AppInfo, Req, development, Url) ->
       DocPrefixPlusSlash = AppInfo#boss_app_info.doc_prefix ++ "/",
       {Result, SessionID1} = case string:substr(Url, 1, length(DocPrefixPlusSlash)) of
  
positive.code: 
              case ActionResult of
                  undefined ->
                      render_view(Location, AppInfo, Req, SessionID1, [{"_before", Info}], LangHeaders);
                  ActionResult ->
                      process_action_result({Location, Req, SessionID1, [Location|LocationTrail]},
                          ActionResult, LangHeaders, AppInfo, Info)
              end;
          Other ->
              Other
  
negative.code:             {not_found, "The requested page was not found. Additionally, no handler was found for processing 404 errors."}
      end;
  
  process_action_result({{Controller, _, _}, _, _}, {redirect, Where, Headers}, ExtraHeaders, AppInfo, _) ->
      {redirect, process_redirect(Controller, Where, AppInfo), merge_headers(Headers, ExtraHeaders)};
  
  process_action_result(Info, {js, Data, Headers}, ExtraHeaders, AppInfo, AuthInfo) ->
      process_action_result(Info, {output, Data, merge_headers(Headers, [{"Content-Type", "application/javascript"}])},
          ExtraHeaders, AppInfo, AuthInfo);
  
  process_action_result(Info, {json, Data, Headers}, ExtraHeaders, AppInfo, AuthInfo) ->
      process_action_result(Info, {output, boss_json:encode(Data, AppInfo#boss_app_info.model_modules),
              merge_headers(Headers, [{"Content-Type", "application/json"}])}, ExtraHeaders, AppInfo, AuthInfo);
  
  process_action_result(Info, {jsonp, Callback, Data, Headers}, ExtraHeaders, AppInfo, AuthInfo) ->
      JsonData  = boss_json:encode(Data, AppInfo#boss_app_info.model_modules),
      process_action_result(Info, {output, Callback ++ "(" ++ JsonData ++ ");",
              merge_headers(Headers, [{"Content-Type", "application/javascript"}])}, ExtraHeaders, AppInfo, AuthInfo);
  
  process_action_result(_, {output, Payload, Headers}, ExtraHeaders, _, _) ->
      {ok, Payload, merge_headers(Headers, ExtraHeaders)};
  
  process_action_result(_, Else, _, _, _) ->
      Else.
  
  render_view(Location, AppInfo, RequestContext) ->
      render_view(Location, AppInfo, RequestContext, []).
  
  render_view(Location, AppInfo, RequestContext, Variables) ->
      render_view(Location, AppInfo, RequestContext, Variables, []).
  
  render_view({Controller, Template, _}, AppInfo, RequestContext, Variables, Headers) ->
      Req = proplists:get_value(request, RequestContext),
      SessionID = proplists:get_value(session_id, RequestContext),
      TryExtensions = boss_files:template_extensions(),
      LoadResult = lists:foldl(fun
              (Ext, {error, not_found}) ->
  