您好360搜索站长团队:
站点:www.liepin.com
问题类型:爬虫请求对协议头的处理与规范不符,导致站点 500 错误
严重程度:严重(影响 SEO 流量采集,函数式路由 100% 异常)
================================
一、问题描述
================================
贵方 360Spider 爬虫在访问 www.liepin.com 时,GET 请求携带 Content-Type: * 请求头。
该请求头违反 RFC 7231 §3.1.1.5 规定:
1) Content-Type 不允许通配符;
2) GET 请求无请求体,本就不应携带 Content-Type 头。
该非法请求头经 WAF / Nginx / aether-proxy 链路原样透传到后端 SpringBoot3 (Spring6) 服务,
触发 HttpHeaders.setContentType() 强校验,直接抛出 IllegalArgumentException:
"Content-Type cannot contain wildcard type '*'"
导致函数式 Web 路由 (RouterFunctionMapping) 路径 100% 返回 500。
================================
二、问题影响
================================
- 函数式 Web 路由接口全部报错;
- 普通 @Controller 接口不报错(因不调用 ServerRequest.create()),
同一份非法头在不同接口表现不一致,排查定位耗时;
- 影响域名在360 搜索收录的稳定性。
================================
三、已确认非本端问题(关键证据)
================================
我们在 WAF / Nginx / 后端三层做了完整溯源,确认 Content-Type: * 由360Spider 随请求自带,
链路各层均原样透传,均未主动注入。
证据 1:WAF access_log (同一 traceid 对得上 nginx 时间,WAF 时区-8h)
--------------------------------------------------
traceid: 7b3975b117899100520575899e31f3
content_type: *
request_method: GET
request_path: /company/gs74385430/
http_user_agent: ... Chrome/140.0.0.0 ... 360Spider
time: 2026-09-20T21:14:12+08:00
matched_host: *.liepin.com
证据 2:后端请求日志 (SpringBoot3 / Spring6)
--------------------------------------------------
method: GET
uri: http://www.liepin.com/company/gs74385430/
User-Agent: ... Chrome/140.0.0.0 ... 360Spider
Content-Type: *
Accept: */*
X-Forwarded-Cluster: waf,
serviceName: ins-www-web
serviceRespStatusCode: 500
证据 3:Nginx 配置审计--------------------------------------------------
线上 nginx 配置无任何 proxy_set_header Content-Type 指令,
不主动修改、不主动添加请求头,仅原样透传上游。
================================
四、我们的诉求
================================
1. 确认360Spider 是否会在 GET 请求中主动注入 Content-Type 请求头;
2. 若是,请排查注入逻辑,移除 Content-Type: * 这类非法值;
3. 在未修复前,请对 GET 请求跳过 Content-Type 头注入;
4. 修复后请反馈具体修复版本与上线时间
|
|
|
|
|
|
评论
直达楼层