为什么 wireshark 知道使用 http 协议解析来自非标准 http 端口的消息?

Why does wireshark know using http protocol dissect messages from non-standard http port?

我用tcpdump抓取Mesosmaster和client之间的消息,用wireshark打开:

为什么 wireshark 知道使用 http 协议来解析消息,尽管端口是 5050 而不是 80。我没有设置任何特殊配置。

问题不太具体,但据我了解,您想知道 Wireshark 如何解析来自其他端口的消息。因为 Wireshark 扫描所有端口

Why does wireshark know using http protocol to dissect the message though the port is 5050, not 80.

因为,在您使用的 Wireshark 版本中,有一个 "heuristic" 版本的 HTTP 解析器,它会为任何尚未被其他解析器解析的 TCP 段调用;它会查看数据包,看看它是否看起来足够像 HTTP 请求或响应的一部分,如果是,就会对其进行剖析。