HTTP服务器正确性测试

发布于 2024-12-07 11:34:17 字数 369 浏览 1 评论 0原文

我编写了一个简单的 HTTP 服务器,到目前为止我偶然发现了一些难以追踪的错误。例如,不在响应的标头和内容之间添加空行,或者为 WebSocket 连接提供错误的质询响应。对于这些错误,Firefox 通常会忽略它们并显示页面,而 Chrome 只是关闭套接字而不给出任何错误消息。

是否有一个简单的免费程序可以向我的服务器发出一些请求并报告它出错的每一个小问题,以便我可以追踪这些错误?我见过一些这样的程序,但没有一个是免费的,而且我真的不想在业余爱好项目上投入太多。 (也许 Chrome 甚至有一个标志可以在关闭套接字时解释问题?)

我并不关心处理来自客户端的奇怪请求(正如 Apache Test 似乎关注的那样) - 我需要验证的是理智的请求会得到正确的响应,不会让客户端感到困惑。

I've written a simple HTTP server, and I've stumbled upon a few bugs so far that proved difficult to track down. For example, not adding a blank line between headers and content of a response, or giving an incorrect challenge response for a WebSocket connection. With such bugs, it seems Firefox usually ignores them and displays the page anyway, and Chrome just closes the socket without giving any error message.

Is there a simple, free program out there that will place some requests to my server and report every little thing it does wrong, so I can track down these bugs? I've seen a few such programs, but none free, and I don't really want to invest a lot into a hobby project. (Maybe Chrome even has a flag that makes it explain the problem when it closes a socket?)

I'm not as concerned about dealing with weird requests from a client (as Apache Test seems to focus on) - what I need to verify is that sane requests get correct responses that won't confuse the client.

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

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

发布评论

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

评论(1

北方的韩爷 2024-12-14 11:34:17

获取现有服务器的测试并将其指向您的服务器。

Grab the tests for an existing server and pointing them at yours instead.

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