anchor.diff:      PortBin = binary:list_to_bin(io_lib:format("~p", [Port])),
       << <<":">>/binary, PortBin/binary>>.
   
  -
  +%% @doc return the protocol to use, either https or http.
  +-spec local_protocol() -> ProtocolText :: binary().
   local_protocol() ->
       return_http(?CONFIG(ssl)).
  +
  +%% helper function to return the protocol
  +-spec return_http(UseSSL :: boolean()) -> binary().
   return_http(false) ->
       <<"http://">>;
   return_http(_) ->
  
positive.code: whole_url(Path) when is_list(Path) ->
      whole_url(list_to_binary(Path)).
  
  redirect_to(Url, Req) ->
      Header = [{<<"location">>, Url}],
      {ok, Req2} = cowboy_req:reply(302, Header, Req),
      {ok, Req2, []}.
  
  cookie_name() ->
      ?COOKIE.
  
  local_port() ->
      return_port(?CONFIG(port), ?CONFIG(ssl)).
  return_port(443, true) ->
      <<"">>;
  return_port(80, false) ->
  
negative.code: 
  -define(COOKIE, <<"watts_session">>).
  
  %% @doc either update or delete a cookie.
  %% the cookie will either be updated with a new lifetime or will be deleted
  %% by setting the time to timestamp 0.
  -spec perform_cookie_action(Action :: clear | update, MaxAge :: integer(),
                              CookieData :: deleted | binary(),
                              cowboy_req:req()) -> {ok, cowboy_req:req()}.
  perform_cookie_action(clear, _MaxAge, _Value, Req) ->
      Opts = create_cookie_opts(0),
      Req2 = cowboy_req:set_resp_cookie(?COOKIE, <<"deleted">>, Opts, Req),
  