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:     Req2 = cowboy_req:set_resp_cookie(?COOKIE, Value, Opts, Req),
      {ok, Req2}.
  
  create_cookie_opts(MaxAge) ->
      BasicOpts = [ {http_only, true}, {max_age, MaxAge}, {path, <<"/">>}],
      case ?CONFIG(ssl) of
  
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),
  