哪些 Web 应用程序框架强制每个客户端/服务器的 HTTP TCP 连接限制为两个?

发布于 2024-08-28 02:22:18 字数 262 浏览 8 评论 0原文

HTTP 1.1 RFC 限制客户端在任何客户端和客户端之间使用两个以上的 TCP 连接服务器。我想知道哪个 Web 应用程序框架强制执行此限制。

问候

The HTTP 1.1 RFC restricts a Client from using more than Two TCP connections between any Client and Server. I want to know which Web Application Frameworks enforce this restriction.

Regards

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

囚你心 2024-09-04 02:22:18

HTTP 1.1 实现不是 Web 应用程序框架的功能,而是客户端或服务器 HTTP 代理的功能。换句话说,它在客户端由 Safari、Chrome、Firefox 和 Internet Explorer 实现,在服务器端由 Apache 或 IIS 实现 [*]。当然,还有更多的 HTTP 代理也实现了 HTTP 1.1;我只是列出了最流行的(如“我使用的”:-))。

据我所知,您链接到的维基百科文章中列出的大多数 Web 应用程序框架应该至少在 Apache 和/或 IIS 之上运行,因此它们应该能够从 HTTP 1.1 中受益。但是,如果用户使用的浏览器不支持 HTTP 1.1,则 Apache 和 IIS 的默认配置将回退到 HTTP 1.0,并且在最常见的情况下,这对于您选择的 Web 应用程序框架来说是透明的。

更新:您的问题应解释为(根据您的评论)“哪些 Web 应用程序框架仅支持 HTTP 1.1 作为传输协议”。

没有主要的 Web 服务框架仅通过 HTTP 1.1 强制执行端点配置或客户端调用。所有这些都允许应用程序代码(服务或客户端)选择传输方式。造成这种情况的主要原因有两个:

  1. 协议选择取决于实际服务的部署配置,因此它与所使用的框架正交,并且 Web 服务开发人员很少通过
  2. 框架手段将传输协议选择限制为 HTTP 1.1采用障碍,这是任何框架作者都不希望出现的。

唯一可能强制执行特定 HTTP 版本的框架是带有自己的 Web 服务器实现或带有主要 Web 服务器(通常是 Apache)的预配置部署的框架。然而,我不知道有什么会只强制执行 HTTP 1.1;如果有的话,他们只会强制执行 HTTP 1.0。

还有一个非常实际的原因阻碍了 Web 服务的 HTTP 1.1 强制实施 - 大多数部署预计会在未知数量的中间网关(防火墙、缓存服务器、负载均衡器等)上工作,这些网关可能支持也可能不支持 HTTP 1.1 ,因此 Web 服务客户端和 Web 服务端点之间的协议协商会在没有 HTTP 1.0 的回退支持的情况下失败。

[*] 嗯,从技术上来说,它是由 Windows 平台上的 WinHTTP 和 WinInet 实现的,只是被应用程序重用。我确信有一个公共库也可以在 Linux 上重用(可能称为 libhttp.so 或类似的东西,但不要引用我的话:-))。

The HTTP 1.1 implementation is not a function of the web application framework, it's a function of the client or server HTTP agent. In other words, it's implemented by Safari, Chrome, Firefox and Internet Explorer on the client side, and Apache or IIS on the server side [*]. Of course, there are a lot more HTTP agents out there that also implement HTTP 1.1; I am just listing the most popular (as in "that I use" :-)) ones.

As far as I know, most of the web application frameworks listed on that Wikipedia article you linked to should happily run on top of Apache and/or IIS at least, so they should be able to benefit from HTTP 1.1. However, if the browser the user is using does not support HTTP 1.1, the default configuration for Apache and IIS will be to fallback to HTTP 1.0, and that will happen transparently to the web app framework of your choice in the most common case.

Update: Your question should be paraphrased (as per your comment) to "Which web application frameworks support only HTTP 1.1 as transport protocol".

There are no major web service frameworks that enforce endpoint configurations or client calls over HTTP 1.1 only. All of them allow the application code (service or client) to choose the transport. There are two main reasons for this:

  1. the protocol choice depends on the deployment configuration of the actual service, so it's orthogonal to the framework used and is rarely made by the web service developer
  2. limiting the transport protocol choice to HTTP 1.1 by the framework means increased adoption barrier, which no framework author would want.

The only frameworks that might enforce particular HTTP version would be ones that come with either their own implementation of the web server or with pre-configured deployment of a major web server (usually Apache). However, I am not aware of any that would enforce HTTP 1.1 only; if anything, they would enforce HTTP 1.0 only.

There is also one very practical reason that prevents HTTP 1.1 enforcementfor web services in general - most deployments are expected to work across an unknown number of middle gateways (firewalls, caching servers, load balancers and so on) which might or might not support HTTP 1.1, so the protocol negotiation between the web service client and the web service endpoint fail without fallback support for HTTP 1.0.

[*] Well, technically, it's implemented by WinHTTP and WinInet on Windows platform and is just reused by the applications. And I am sure there's a common library that is reused on Linux as well (probably called libhttp.so or something like it, but don't quote me on that :-)).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文