anchor.diff:  get_cookie(#state{cookies = undefined} = State, Name, Type_Mod) ->
       %% Cookies are not parsed yet: get the "Cookie" headers and parse
       %% their value.
  -    State1 = parse_cookies(State),
  +    State1 = headers_to_cookies(State),
       get_cookie(State1, Name, Type_Mod);
   get_cookie(#state{cookies = Cookies} = State, Name, Type_Mod) ->
       case get_loop(Name, Type_Mod, Cookies, [], undefined, false) of
  
positive.code:     get_rheader/3,
      get_cookie/2,
      get_cookie/3,
      set/3,
      set/4,
      set_uservar/3,
  
negative.code:             {State, Value}
      end.
  
  headers_to_cookies(#state{headers = Headers} = State) ->
      Ret = get_loop("cookie", undefined, Headers, [], [], remove),
      {Cookie_Hds1, Headers2} = case Ret of
          {Cookie_Hds, Headers1} -> {Cookie_Hds, Headers1};
          Cookie_Hds             -> {Cookie_Hds, Headers}
      end,
      Cookies = parse_cookie_hds(Cookie_Hds1, []),
      State#state{
        headers = Headers2,
        cookies = Cookies
      }.
  
  cookies_to_headers(#state{cookies = undefined} = State) ->
      State;
  cookies_to_headers(#state{cookies = []} = State) ->
      State#state{
        cookies = undefined
      };
  cookies_to_headers(#state{cookies = Cookies, headers = Headers} = State) ->
      Cookie_Hd = otis_utils:format_cookie_header(Cookies),
      Headers1 = Headers ++ [{"cookie", Cookie_Hd, undefined, undefined}],
      State#state{
        headers = Headers1,
        cookies = undefined
      }.
  
  parse_cookie_hds([Cookie_Hd | Rest], All_Cookies) ->
      Cookies = otis_utils:parse_cookie_header(Cookie_Hd),
      parse_cookie_hds(Rest, All_Cookies ++ Cookies);
  parse_cookie_hds([], All_Cookies) ->
      All_Cookies.
  
  get_loop(Name, undefined,
  