您的位置:首页 > 娱乐 > 明星 > crm网站下载_正版app下载_网络营销的主要推广方式_semantic scholar

crm网站下载_正版app下载_网络营销的主要推广方式_semantic scholar

2025/4/26 23:09:52 来源:https://blog.csdn.net/weixin_53132064/article/details/142425737  浏览:    关键词:crm网站下载_正版app下载_网络营销的主要推广方式_semantic scholar
crm网站下载_正版app下载_网络营销的主要推广方式_semantic scholar

请求头分类

End-to-end(端对端)

必须全部带给目标服务器,不会被中途变化或去掉

Hop-by-hop(逐跳头)

比如客户端发请求,要路过代理(例如Nginx),头可以被自动删掉,来到真正服务器上是没有的

进入HTTP文档RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1 (rfc-editor.org)

原文:

13.5.1 End-to-end and Hop-by-hop HeadersFor the purpose of defining the behavior of caches and non-cachingproxies, we divide HTTP headers into two categories:- End-to-end headers, which are  transmitted to the ultimaterecipient of a request or response. End-to-end headers inresponses MUST be stored as part of a cache entry and MUST betransmitted in any response formed from a cache entry.- Hop-by-hop headers, which are meaningful only for a singletransport-level connection, and are not stored by caches orforwarded by proxies.The following HTTP/1.1 headers are hop-by-hop headers:- Connection- Keep-Alive- Proxy-Authenticate- Proxy-Authorization- TE- Trailers- Transfer-Encoding- UpgradeAll other headers defined by HTTP/1.1 are end-to-end headers.Other hop-by-hop headers MUST be listed in a Connection header,(section 14.10) to be introduced into HTTP/1.1 (or later).

上文说以下都是Hop-by-hop头,除了这些都是End-to-end:

      - Connection
      - Keep-Alive
      - Proxy-Authenticate
      - Proxy-Authorization
      - TE
      - Trailers
      - Transfer-Encoding
      - Upgrade

总结:

端到端(End-to-end)

一定会被最终目标接收,必须保存在由缓存生成的响应中,头必须被转发

逐跳头(Hop-by-hop)

只对单次转发有效,会因通过缓存或代理而不再转发

HTTP/1.1和以后版本中如果要使用Hop-to-hop头,需提供Connection头字段

Connection:keep-alive头的作用

这种情况,客户端(浏览器)与Nginx服务器(代理服务器)建立keep-alive连接,不会与Tomcat建立keep-alive

 如果是直接访问的Tomcat服务器,则会与tomcat建立keep-alive关系

客户端与服务端的连接保活技术,可以减少TCP的连接创建断开额外开销,减轻服务器负载,减少响应时间

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com