https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html

The TRACE method is used to invoke a remote, application-layer loop- back of the request message. The final recipient of the request SHOULD reflect the message received back to the client as the entity-body of a 200 (OK) response. The final recipient is either the

origin server or the first proxy or gateway to receive a Max-Forwards value of zero (0) in the request (see section 14.31). A TRACE request MUST NOT include an entity.

TRACE allows the client to see what is being received at the other end of the request chain and use that data for testing or diagnostic information. The value of the Via header field (section 14.45) is of particular interest, since it acts as a trace of the request chain. Use of the Max-Forwards header field allows the client to limit the length of the request chain, which is useful for testing a chain of proxies forwarding messages in an infinite loop.

If the request is valid, the response SHOULD contain the entire request message in the entity-body, with a Content-Type of "message/http". Responses to this method MUST NOT be cached.

https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.45

The Via general-header field MUST be used by gateways and proxies to indicate the intermediate protocols and recipients between the user agent and the server on requests, and between the origin server and the client on responses. It is analogous to the "Received" field of RFC 822 [9] and is intended to be used for tracking message forwards, avoiding request loops, and identifying the protocol capabilities of all senders along the request/response chain.

      Via =  "Via" ":" 1#( received-protocol received-by [ comment ] )
received-protocol = [ protocol-name "/" ] protocol-version
protocol-name = token
protocol-version = token
received-by = ( host [ ":" port ] ) | pseudonym
pseudonym = token

The received-protocol indicates the protocol version of the message received by the server or client along each segment of the request/response chain. The received-protocol version is appended to the Via field value when the message is forwarded so that information about the protocol capabilities of upstream applications remains visible to all recipients.

The protocol-name is optional if and only if it would be "HTTP". The received-by field is normally the host and optional port number of a recipient server or client that subsequently forwarded the message. However, if the real host is considered to be sensitive information, it MAY be replaced by a pseudonym. If the port is not given, it MAY be assumed to be the default port of the received-protocol.

Multiple Via field values represents each proxy or gateway that has forwarded the message. Each recipient MUST append its information such that the end result is ordered according to the sequence of forwarding applications.

Comments MAY be used in the Via header field to identify the software of the recipient proxy or gateway, analogous to the User-Agent and Server header fields. However, all comments in the Via field are optional and MAY be removed by any recipient prior to forwarding the message.

For example, a request message could be sent from an HTTP/1.0 user agent to an internal proxy code-named "fred", which uses HTTP/1.1 to forward the request to a public proxy at nowhere.com, which completes the request by forwarding it to the origin server at www.ics.uci.edu. The request received by www.ics.uci.edu would then have the following Via header field:

       Via: 1.0 fred, 1.1 nowhere.com (Apache/1.1)

Proxies and gateways used as a portal through a network firewall SHOULD NOT, by default, forward the names and ports of hosts within the firewall region. This information SHOULD only be propagated if explicitly enabled. If not enabled, the received-by host of any host behind the firewall SHOULD be replaced by an appropriate pseudonym for that host.

For organizations that have strong privacy requirements for hiding internal structures, a proxy MAY combine an ordered subsequence of Via header field entries with identical received-protocol values into a single such entry. For example,

       Via: 1.0 ricky, 1.1 ethel, 1.1 fred, 1.0 lucy
        could be collapsed to
       Via: 1.0 ricky, 1.1 mertz, 1.0 lucy

Applications SHOULD NOT combine multiple entries unless they are all under the same organizational control and the hosts have already been replaced by pseudonyms. Applications MUST NOT combine entries which have different received-protocol values.

track message forwards, avoiding request loops, and identifying the protocol capabilities of all senders along the request/response chain的更多相关文章

  1. 直接用request.setAttribute()会报错,在这之前应该先让request获取ServletActionContext.getRequest();方法 // request.getAttribute同理

    正确流程应该是 import javax.servlet.http.HttpServletRequest; HttpServletRequst request = ServletActionConte ...

  2. 将C4C Service Request中的summary和其他附件同步到ERP的Billing Request去

    C4C里将Service Request称为Work Ticket. 比如现在我的Service Request有两个行项目,只有第一个需要同步到ERP去.但是第二个行项目对于客户检查Invoice来 ...

  3. RFC 2616

    Network Working Group R. Fielding Request for Comments: 2616 UC Irvine Obsoletes: 2068 J. Gettys Cat ...

  4. RFC2616-HTTP1.1-Header Field Definitions(头字段规定部分—单词注释版)

    part of Hypertext Transfer Protocol -- HTTP/1.1RFC 2616 Fielding, et al. 14 Header Field Definitions ...

  5. 感性认识JWT

    常见的认证机制 今天我么聊一聊JWT. 关于JWT,相信很多人都已经看过用过,他是基于json数据结构的认证规范,简单的说就是验证用户登没登陆的玩意.这时候你可能回想,哎哟,不是又那个session么 ...

  6. Identifying a distributed denial of service (DDOS) attack within a network and defending against such an attack

    The invention provides methods, apparatus and systems for detecting distributed denial of service (D ...

  7. Methods for Using Message Queuing Telemetry Transport for Sensor Networks to Support Sleeping Devices

    Methods support a sleep mode for an embedded device. Embedded devices like sensors and actuators use ...

  8. Volley(三)—— ImageRequest & Request简介

    Volley(三)—— ImageRequest & Request简介 上 篇文章我们讲 到了如何用volley进行简单的网络请求,我们可以很容易的接受到string.JsonObjec类型 ...

  9. 详细解读Volley(二)—— ImageRequest & Request简介

    上篇文章我们讲到了如何用volley进行简单的网络请求,我们可以很容易的接受到string.JsonObjec类型的返回结果,之前的例子仅仅是一次请求,这里需要说明volley本身就是适合高并发的,所 ...

随机推荐

  1. ASP.NET基础代码备忘

    使用ASP.NET原生的__doPostBack方法触发asp:Button //javaScript部分 __doPostBack('<%=btnAmountDivided.UniqueID ...

  2. 医学CT图像特征提取算法(matlab实现)

    本科毕设做的是医学CT图像特征提取方法研究,主要是肺部CT图像的特征提取.由于医学图像基本为灰度图像,因此我将特征主要分为三类:纹理特征,形态特征以及代数特征,每种特征都有对应的算法进行特征提取. 如 ...

  3. access日期与sql server日期区别

    如选取一段时间内的数据,time1和time2是时间起始字符串,则 sql server命令: string strSQL=" 日期 >='"+time1+"' A ...

  4. XHPROF相关内容

    定义入口文件 define('XHPROF_OPEN', 0); define('XHPROF_ROOT', '/home/www/xhprof/'); // 开启调试模式 建议开发阶段开启 部署阶段 ...

  5. AngularJS 初用总结

    一直用惯jquery,初用Angularjs的初段时间,需要先了解一下她的类MVC思想. 初学时几个比较基本的概念: 1.客户端模板 2. Model View Controller (MVC) 3. ...

  6. 快速得出e指数的算法

    , b, c = , d, e = , f[]; int main() { for (;b - c;) f[b++] = gap; , c;c-=, printf("%.4d ", ...

  7. Vim 键盘指令高清图

    个人感觉挺好用的 推荐大家使用windows版的vim,个人用着感觉不错,在linux上用惯了vim的朋友可以试试这个.

  8. python3安装

    yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel ...

  9. Lattice FPGA 板子 调试笔记

    最近在调试LATTICE  FPGA 做的视频板子,颇不顺利,所以记录下来作为以后的参考: 1.FPGA的IO口不是所有的都是双向的,有些有特殊作用的是单向的. 在查阅 LatticeECP3-17E ...

  10. Sql Server 中锁的概念

    锁的概述 一. 为什么要引入锁 多个用户同时对数据库的并发操作时会带来以下数据不一致的问题: 丢失更新A,B两个用户读同一数据并进行修改,其中一个用户的修改结果破坏了另一个修改的结果,比如订票系统 脏 ...