"x-ec-custom-error:1";这是什么意思? [英] "x-ec-custom-error: 1" What does it mean?
问题描述
在研究HTTP协议时,我在响应标头字段中看到了这一点:
While studying the HTTP protocol, I saw this in a response header field:
x-ec-custom-error: 1
我正在使用netcat通过代理连接获取example.com的主页.
I was using netcat to get example.com's main page through a proxy connection.
以下是所有控制台通信,其中出现了此标头:
Here is all console comunication where this header appears:
$ nc -x (omitted proxy address):3128 -Xconnect www.example.com 80
GET http://www.example.com/ HTTP/1.1
Host: www.example.com
HTTP/1.1 200 OK
Accept-Ranges: bytes
Cache-Control: max-age=604800
Content-Type: text/html
Date: Fri, 07 Mar 2014 20:08:45 GMT
Etag: "359670651"
Expires: Fri, 14 Mar 2014 20:08:45 GMT
Last-Modified: Fri, 09 Aug 2013 23:54:35 GMT
Server: ECS (iad/19AB)
X-Cache: HIT
x-ec-custom-error: 1 <----------------HERE
Content-Length: 1270
(Omitted message body)
注意到后,我尝试在Google和此网站上进行详尽的搜索,但找不到任何答案,也没有与我讨论这个问题的人.
After noticing it, I tried searching thouroughly on google and on this site but I didn't find the answer anywhere, nor did the people who were discussing this with me.
提前感谢所有答案.
推荐答案
X-
前缀标头是非标准标头,通常特定于所使用的特定软件.
X-
prefixed headers are nonstandard headers that are often specific to the particular software in use.
ECS(iad/19AB)
Server
标头显示EdgeCast(现为Verizon Digital Media Services)CDN正在从其IAD(弗吉尼亚州)提供内容存在点.
The ECS (iad/19AB)
Server
header shows that the content is being served by the EdgeCast (now Verizon Digital Media Services) CDN from their IAD (Virginia) point of presence.
x-ec-custom-error 中的 ec
很可能代表EdgeCast,但标头的整体含义并未公开记录,可能特定于应用程序.
The ec
in x-ec-custom-error
very likely stands for EdgeCast, but the meaning of the header as a whole isn't publicly documented and is probably application-specific.
但是,有一种理论认为, example.com
上的所有可能的HTTP状态代码都将替换为自定义错误页面,并且此标头就是对此的一种指示.因此,无论原始服务器返回的是 200 OK
还是 404 Not Found
,EdgeCast都配置为用预定义的响应替换页面内容.
One theory though is that every possible HTTP status code on example.com
is being replaced with a custom error page, and that this header is an indicator of that. So regardless of whether the origin server returns a 200 OK
or 404 Not Found
, EdgeCast is configured to replace the page contents with a predefined response.
$ curl -i http://example.com/asdfsdfasf
HTTP/1.1 404 Not Found
Server: ECS (oxr/83C7)
X-Cache: HIT
x-ec-custom-error: 1
$ curl -i http://example.com/
HTTP/1.1 200 OK
Server: ECS (ftw/FBE4)
X-Cache: HIT
x-ec-custom-error: 1
(此外, X-Cache:HIT
标头告诉您该页面是在EdgeCast的缓存中找到的,并直接从它们提供服务.)
(Also, the X-Cache: HIT
header tells you that the page was found in EdgeCast's cache and was served directly from them.)
这篇关于"x-ec-custom-error:1";这是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!