You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

CookiesManager加载已保存Cookie遇无效日期格式问题求助及解决记录

Fixing "Invalid Cookies Date format" Error When Loading Saved Cookies into CookiesManager

I ran into a frustrating issue recently when trying to load saved cookies into a CookiesManager—kept getting the error Invalid Cookies Date format.

Here's one of the cookie entries I was working with initially:

ds_user_id=7459742257; Path=/; Domain=Testing.com; Max-Age=7775999; Expires=Sat, 07-Jul-2018 17:52:03 GMT

At first, I had no clue what was causing the problem. After digging through all my saved cookie items, I finally found the culprit: another cookie with an absurdly far-future expiration date:

rur=FTW; Path=/; Domain=Testing.com; Max-Age=251879107499; Expires=Sat, 01-Jan-10000 06:59:59 GMT

The issue boiled down to the year 10000 in the Expires field. It turns out the CookiesManager's date parsing logic can't handle such an oversized year value. Once I modified the year to a reasonable value like 2019, the cookies loaded successfully without any errors.

Relevant code snippet (Delphi):

var 
  S: string; 
  Cookies: TIdCookieList;
// Rest of the cookie loading implementation here

内容的提问来源于stack exchange,提问作者Mr.Mark

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 09:00:15