anchor.diff:      case header_value(Req, "WWW-Authenticate") of
       "X-Couch-Test-Auth " ++ NamePass ->
           % NamePass is a colon separated string: "joe schmoe:a password".
  -        [Name, Pass] = re:split(NamePass, ":", [{return, list}]),
  +        [Name, Pass] = re:split(NamePass, ":", [{return, list}, {parts, 2}]),
           case {Name, Pass} of
           {"Jan Lehnardt", "apple"} -> ok;
           {"Christopher Lenz", "dog food"} -> ok;
  
positive.code:     AuthorizationHeader = header_value(Req, "Authorization"),
      case AuthorizationHeader of
      "Basic " ++ Base64Value ->
          case string:tokens(?b2l(base64:decode(Base64Value)),":") of
          ["_", "_"] ->
              % special name and pass to be logged out
              nil;
          [User, Pass] ->
              {User, Pass};
          [User | Pass] ->
              {User, string:join(Pass, ":")};
          _ ->
              nil
          end;
  
negative.code:     undefined -> Req;
      [] -> Req;
      Cookie ->
          [User, TimeStr, HashStr] = try
              AuthSession = couch_util:decodeBase64Url(Cookie),
              [_A, _B, _Cs] = re:split(?b2l(AuthSession), ":",
                                       [{return, list}, {parts, 3}])
          catch
              _:_Error ->
                  Reason = <<"Malformed AuthSession cookie. Please clear your cookies.">>,
  