HTTP服务器正确性测试
我编写了一个简单的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
获取现有服务器的测试并将其指向您的服务器。
Grab the tests for an existing server and pointing them at yours instead.