anchor.diff:  
                       case {IsRev, IsRedirect} of
                           {_, {true, Redir}} ->
  -                            deliver_redirect_map(CliSock, Req, ARG, Redir, N);
  +                            ARG1 = ARG#arg{server_path = DecPath,
  +                                           querydata   = QueryString},
  +                            deliver_redirect_map(CliSock, Req, ARG1, Redir, N);
                           {false, _} ->
                               %%'main' branch so to speak. Most requests
                               %% pass through here.
  
positive.code:     %% Here Code is 3xx
      ?Debug("in redir ~p", [Code]),
      H = get(outh),
      DecPath = safe_decode_path(Req#http_request.path),
      Loc = if
                Mode == append ->
                    NPath   = filename:join([URL#url.path ++ DecPath]),
                    LocPath = yaws_api:format_partial_url(URL#url{path=NPath},
                                                          get(sc)),
                    ["Location: ", LocPath, "\r\n"];
                true -> %% noappend
                    LocPath = yaws_api:format_partial_url(URL, get(sc)),
                    case yaws:split_at(DecPath, $?) of
                        {_, []} -> ["Location: ", LocPath, "\r\n"];
                        {_, Q}  -> ["Location: ", LocPath, "?", Q, "\r\n"]
                    end
            end,
      {DoClose, _Chunked} = yaws:dcc(Req, Arg#arg.headers),
      new_redir_h(H#outh{
                    connection = yaws:make_connection_close_header(DoClose),
  
negative.code:                      {_Prefix, Code, Path, Mode}, N) when is_list(Path) ->
      %% Here Code is 1xx, 2xx, 4xx or 5xx
      ?Debug("in redir ~p", [Code]),
      Path1 = if
                  Mode == append ->
                      EncPath = yaws_api:url_encode(Arg#arg.server_path),
                      filename:join([Path ++ EncPath]);
                  true -> %% noappend
                      Path
              end,
      Page = case Arg#arg.querydata of
                 undefined -> Path1;
                 []        -> Path1;
                 Q         -> Path1 ++ "?" ++ Q
             end,
  
      %% Set variables used in handle_method_result/7
  