400 Bad Request

简介: All Internet-based HTTP/1.1 servers MUST respond with a 400 (Bad Request) status code to any HTTP/1.1 request message which lacks a Host header field.The Host request-header field s

All Internet-based HTTP/1.1 servers MUST respond with a 400 (Bad Request) status code to any HTTP/1.1 request message which lacks a Host header field.

...

The Host request-header field specifies the Internet host and port number of the resource being requested, as obtained from the original URI given by the user or referring resource (generally an HTTP URL,

as described in section 3.2.2). The Host field value MUST represent the naming authority of the origin server or gateway given by the original URL. This allows the origin server or gateway to differentiate between internally-ambiguous URLs, such as the root “/” URL of a server for multiple host names on a single IP address.

   Host = "Host" ":" host [ ":" port ] ; Section 3.2.2

A “host” without any trailing port information implies the default port for the service requested (e.g., “80” for an HTTP URL). For example, a request on the origin server for http://www.w3.org/pub/WWW/ would properly include:

   GET /pub/WWW/ HTTP/1.1
   Host: www.w3.org

A client MUST include a Host header field in all HTTP/1.1 request messages . If the requested URI does not include an Internet host name for the service being requested, then the Host header field MUST be given with an empty value. An HTTP/1.1 proxy MUST ensure that any request message it forwards does contain an appropriate Host header field that identifies the service being requested by the proxy. All Internet-based HTTP/1.1 servers MUST respond with a 400 (Bad Request) status code to any HTTP/1.1 request message which lacks a Host header field.

See sections 5.2 and 19.6.1.1 for other requirements relating to Host.

参考

目录
相关文章
|
7月前
|
机器学习/深度学习 弹性计算 人工智能
阿里云轻量应用服务器抢购与云服务器低价长效特惠:活动入口、购买规则与适用场景介绍
2026年阿里云推出多款特惠云服务器,包括38元/年轻量应用服务器(2核2G)和199元/年2核4G配置,及99元/年经济型e实例、199元/年通用算力型u1实例,构成入门级算力矩阵,降低上云门槛。轻量服务器适合快速部署、简易管理,ECS则提供稳定性能和固定带宽。用户可根据需求选择,小微企业及个人开发者可重点关注,业务要求高时可考虑其他高阶实例规格。
|
12月前
|
SQL 移动开发 Oracle
Oracle 数据库查询:多表查询
想把分散在多个表里的数据拼起来看?核心就靠JOIN(连接)和子查询。可以用INNER JOIN找到两边都匹配的记录,或用OUTER JOIN查看单边也存在的数据。一个非常强大的技巧,是把一个查询结果当成临时表来用,能让复杂的统计分析变得清晰。再结合新版本里简洁的分页语法,跨表取数和展示就得心应手了。
1435 4
|
Go 数据安全/隐私保护
Golang 里的 AES、DES、3DES 加解密,支持 ECB、CBC 等多种模式组合
Openssl encryption 是 OpenSSL 库的功能包装,支持对称加密算法(AES、DES、3DES)的 ECB 和 CBC 模式。提供简便的 Go 语言接口,用于加密和解密操作。安装命令:`go get -u github.com/forgoer/openssl`。示例代码展示了 AES-ECB、AES-CBC 等模式的使用方法,支持 PKCS7 填充。
617 129
|
12月前
|
监控 安全 数据可视化
跨域 AD 混合环境权限失控?ADManager Plus 风险分析功能详解
在AD、Azure AD与Microsoft 365共存的混合IT环境中,身份滥用、权限泄露、配置漏洞等安全风险愈发突出,合规治理压力也与日俱增。
210 0
|
算法 搜索推荐 数据挖掘
【2024年华数杯全国大学生数学建模竞赛】C题:老外游中国 问题思路分析及Python代码实现
本文提供了2024年华数杯全国大学生数学建模竞赛C题“老外游中国”的解题思路分析和Python代码实现,涉及景点评分统计、城市综合评价、游玩路线规划以及特定条件下的旅游优化问题。
2614 6
【2024年华数杯全国大学生数学建模竞赛】C题:老外游中国 问题思路分析及Python代码实现
【51单片机】开发板上矩阵键盘键码在数码管上的显示,按下键盘在数码管上显示对应段码
【51单片机】开发板上矩阵键盘键码在数码管上的显示,按下键盘在数码管上显示对应段码
1184 0
第三期:那些年,我们一起经历过的链表中的浪漫
第三期:那些年,我们一起经历过的链表中的浪漫
305 0
|
XML 存储 缓存
4 种主流的 API 架构风格对比
本文讨论了四种主要的 API 架构风格,比较它们的优缺点,并重点介绍每种情况下最适合的 API 架构风格。
4 种主流的 API 架构风格对比
|
SQL 分布式计算 MaxCompute
MaxCompute 使用SQL进行重叠交叉区间问题分析
使用Maxcomputer内置SQL函数进行重叠交叉区间需求分析
1169 1