anchor.diff:              {RequestorType, KeyData}
       end.
   
  -%% @doc Returns the base URI for the server as called by the client as a string.
  -base_uri(Req) ->
  -    Scheme = scheme(Req),
  -    Host = string:join(lists:reverse(wrq:host_tokens(Req)), "."),
  -    PortString = port_string(wrq:port(Req)),
  -    Scheme ++ "://" ++ Host ++ PortString.
  -
  -full_uri(Req) ->
  -    base_uri(Req) ++ wrq:disp_path(Req).
  -
  -scheme(Req) ->
  -    case wrq:get_req_header("x-forwarded-proto", Req) of
  -        undefined ->
  -            case wrq:scheme(Req) of
  -                https -> "https";
  -                http -> "http";
  -                P -> erlang:atom_to_list(P)
  -            end;
  -        Proto -> Proto
  -    end.
  -
  -%% So this is kind of gross and will prevent correct port info if you run https on port 80
  -%% or http on port 443; otherwise it should work. The problem is two-fold, first webmachine
  -%% ignores scheme information when parsing the host header and so always sets the port to 80
  -%% if no port is present in the host header. But in a load-balanced situation, the scheme
  -%% from webmachine may not reflect what is in use at the load balancer. A simple compromise
  -%% is to treat both 80 and 443 as default and only include a port string if the port differs
  -%% from those.
  -port_string(Default) when Default =:= 80; Default =:= 443 ->
  -    "";
  -port_string(Port) ->
  -    [$:|erlang:integer_to_list(Port)].
  -
   %% Tells whether this user is the superuser.
   is_superuser(UserName) ->
       case application:get_env(oc_chef_wm, superusers) of
  
positive.code:                     % is chef_cookbook_version
                      LogMsg = {checksum_missing, Checksum},
                      ErrorMsg = error_message(checksum_missing, Checksum),
                      {{halt, 400}, chef_rest_util:set_json_body(Req, ErrorMsg),
                       State#base_state{log_msg = LogMsg}};
                  Why ->
                      State1 = State#base_state{log_msg = Why},
  
negative.code:          create_from_json/5,
           authorized_by_org_membership_check/2,
           log_request/2,
           update_from_json/4]).
  
  %% Can't use callback specs to generate behaviour_info because webmachine.hrl
  