anchor.diff:      NoCustomer ->
           NoCustomer
       end,
  -
       % add headers...
       {[{<<"info">>, {cloudant_util:customer_db_info(HttpReq, Info)}},
  -        {<<"verb">>, Verb},
  +        {<<"id">>, DocId},
  +        {<<"method">>, Method},
           {<<"path">>, FixedPath},
  -        {<<"query">>, to_json_terms(Req:parse_qs())},
  +        {<<"query">>, json_query_keys(to_json_terms(Req:parse_qs()))},
           {<<"headers">>, to_json_terms(Hlist)},
           {<<"body">>, Body},
  +        {<<"peer">>, ?l2b(Req:get(peer))},
           {<<"form">>, to_json_terms(ParsedForm)},
           {<<"cookie">>, to_json_terms(Req:parse_cookie())},
  -        {<<"userCtx">>, couch_util:json_user_ctx(Db)}]}.
  +        {<<"userCtx">>, couch_util:json_user_ctx(Db#db{name=hd(FixedPath)})}]}.
   
   to_json_terms(Data) ->
       to_json_terms(Data, []).
  
positive.code: -module(chttpd_external).
  
  -export([handle_external_req/2, handle_external_req/3]).
  -export([send_external_response/2, json_req_obj/2]).
  -export([default_or_content_type/2, parse_external_response/1]).
  
  -import(chttpd,[send_error/4]).
  
negative.code:         send_external_response(HttpReq, Response)
      end.
  
  json_req_obj(Req, Db) -> json_req_obj(Req, Db, null).
  json_req_obj(#httpd{mochi_req=Req,
                 method=Method,
                 path_parts=Path,
                 req_body=ReqBody
              } = HttpReq, Db, DocId) ->
      Body = case ReqBody of
          undefined -> Req:recv_body();
          Else -> Else
  