【问题标题】:"x-ec-custom-error: 1" What does it mean?“x-ec-custom-error: 1”是什么意思?
【发布时间】:2014-03-16 02:48:11
【问题描述】:

在研究 HTTP 协议时,我在响应头字段中看到了这一点:

x-ec-custom-error: 1

我正在使用 netcat 通过代理连接获取 example.com 的主页。

这是出现此标头的所有控制台通信:

$ 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)

注意到之后,我尝试在谷歌和这个网站上彻底搜索,但我在任何地方都没有找到答案,与我讨论这个问题的人也没有。

提前感谢所有答案。

【问题讨论】:

    标签: http http-headers netcat


    【解决方案1】:

    X- 前缀标头是非标准标头,通常特定于正在使用的特定软件。

    ECS (iad/19AB)Server 标头显示 EdgeCast(现为 Verizon 数字媒体服务)CDN 从其 IAD(弗吉尼亚)接入点提供内容。

    x-ec-custom-error 中的 ec 很可能代表 EdgeCast,但标头的整体含义并未公开记录,可能是特定于应用程序的。

    一个理论是example.com 上的每个可能的 HTTP 状态代码都被替换为自定义错误页面,并且此标头是一个指示符。因此,无论源服务器返回200 OK 还是404 Not Found,EdgeCast 都被配置为将页面内容替换为预定义的响应。

    $ 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 的缓存中找到并直接从它们提供。)

    【讨论】:

      猜你喜欢
      • 2017-06-24
      • 1970-01-01
      • 2019-04-24
      • 2021-05-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-24
      相关资源
      最近更新 更多