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.

参考

目录
相关文章
|
SQL 运维 DataWorks
DataWorks操作报错合集之DataWorks提交失败: 提交节点的源码内容到TSP(代码库)失败:"skynet_packageid is null,该怎么解决
DataWorks是阿里云提供的一站式大数据开发与治理平台,支持数据集成、数据开发、数据服务、数据质量管理、数据安全管理等全流程数据处理。在使用DataWorks过程中,可能会遇到各种操作报错。以下是一些常见的报错情况及其可能的原因和解决方法。
265 0
|
安全 Java 持续交付
Java本地远程服务器debug调试
Java本地远程服务器debug调试
620 0
|
Python Windows
Python 获取视频时长(附代码) | Python工具
Python 获取视频时长(附代码) | Python工具
Python 获取视频时长(附代码) | Python工具
|
存储 人工智能 数据可视化
Serverless Devs 介绍
## 开篇 2020年11月份,阿里云智能开源了Serverless 社区的开发者工具Serverless Devs(后简称S) 弥补了国内在Serverless 开发者工具的一个空白。通过高度灵活的配置设定,实现了无厂商锁定的支持;直观易懂的可视化配套也带来了极致的开发者使用体验。通过S你可以体验Serverless hello world 以及 构建生产级Serverless 应用 。你
1809 0
|
存储 数据采集 人工智能
如何设计一个监控平台(上篇)
在大型分布式微服务场景下,各个服务版本快速迭代,各类业务规模不断膨胀,同时监控的场景也在不断的发生变化,线上故障随时可能发生,各个平台错综复杂,如何保证线上服务稳定运行,同时提升运维效率,降低运维成本成了监控平台的挑战。
如何设计一个监控平台(上篇)
|
XML Android开发 数据格式
简单使用BottomSheetBehavior实现底部弹窗
这次带来的是BottomSheetBehavior的简单使用,BottomSheetBehavior是Android Support Library23.2中引入的,它可以轻松实现底部动作条功能。
5020 0
|
12月前
|
缓存 前端开发 容器
HarmonyOs开发:轮播图Banner组件封装与使用
目前的轮播图,仅仅对Swiper做了简单的封装,另外增加了一个线条指示器,这远远是不够的,毕竟日常的轮播图形式多种多样,指示器也是千奇百怪,后续也会在此基础之上进行不断的扩展。
331 81
HarmonyOs开发:轮播图Banner组件封装与使用
|
API Java
解决HTTP 400 Bad Request错误的方法
解决HTTP 400 Bad Request错误的方法
7131 0
|
12月前
|
缓存 监控 前端开发
探索前端性能优化:关键策略与代码实例
本文深入探讨前端性能优化的关键策略,结合实际代码示例,帮助开发者提升网页加载速度和用户体验,涵盖资源压缩、懒加载、缓存机制等技术。