Http keep-alive 连接 - 响应分隔符

发布于 2024-10-01 05:04:31 字数 169 浏览 0 评论 0原文

你好,我正在编写一个自定义 http 服务器。起初,我在一个连接上只有一个请求(连接:关闭),一切正常。但是,一旦我重新制作了 connecton: keep-alive 逻辑(一个连接上有更多请求),我的图像就停止显示。我认为,这可能是http响应分隔符的问题。有吗?或者浏览器如何检测当前的 http 响应是否完成?谢谢

Hi i am writing a custom http server. At first i had only one request at one connection possible(Connection: close), everything was ok. But once i remade it connecton: keep-alive logic(more requests at one connection), my images stopped displaying. I think, it may be a problem with http response delimiters. Are there any? Or how can browser detect, that current http response is complete? thx

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

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

发布评论

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

评论(1

剧终人散尽 2024-10-08 05:04:31

响应的大小由 Content-Length 标头或使用 分块传输决定编码

The size of the response is guided by the Content-Length header or by using Chunked Transfer Encoding.

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