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. 启动apache和tomcat端口被占用解决办法

    1,打开控制台,使用命令 netstat -aon|findstr 8090  找出端口被占用的进程, 2,使用 taskkill -f -pid 4116(进程id)杀掉当前占用端口的进程

  2. 启动调试IIS时,vs无法在 Web 服务器上启动调试。Web 服务器未能找到请求的资源。 有关详细信息,请单击“帮助”。

    问题截图 1.检查 是否设置了本地IIS 2.检查IIS端口是否为80 3.默认网站设置是否正确 可参考,查看网站绑定是否正确

  3. 【转】sed 简明教程

    本文转自:http://coolshell.cn/articles/9104.html awk于1977年出生,今年36岁本命年,sed比awk大2-3岁,awk就像林妹妹,sed就是宝玉哥哥了.所以 ...

  4. mac下剪切文件或文件夹

    首先选中文件,按Command+C复制文件:然后按Command+Option+V:就可以把你的文件剪走了!

  5. oracle 11g安装过程中问题:找不到WFMLRSVCApp.ear

    网上的方法是将两个压缩包解压到同一个目录中,我的方法是不再此解压,麻烦,直接将解压出的内容剪切过去,方便省事,原理也是相同的.   解决方法: 将win64_11gR2_database_2of2解压 ...

  6. iOS //清除本地缓存

    //清除本地缓存 -(void)clearCache{ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT ...

  7. Android Telephony —— 手机信号实时变化源码分析过程记录

    源码版本:4.4 跳过InCallActivity等UI实现.先看service以及底层. 1, 在frameworks/opt下面会发现如下文件列表: ./telephony/src/java/co ...

  8. QT 默认环境路径配置方法

    ubuntu 16.04 安装qt5.4之后还是默认使用系统自带的qt4.8,经查证需要在 在目录/usr/lib/x86_64-linux-gnu/qt-default/qtchooser里面的de ...

  9. 8-04流程控制语句BEGIN ..END

     流程控制语句: 是用来控制程序流程的语句. 常用的流程控制语句的分类: 顺序结构:BEGIN...END 分支结构: IF ..ELSE 或CASE ..END 循环结构:WHILE 顺序结构 语法 ...

  10. C语言头文件组织与包含原则

    转自:http://www.cnblogs.com/clover-toeic/p/3728026.html 说明 本文假定读者已具备基本的C编译知识. 如非特殊说明,文中“源文件”指*.c文件,“头文 ...