网络基本功(二十八):Wireshark抓包实例分析HTTP问题(下)

    本文承接上文。

    Client errors:

    以下示例是一个简单的客户端报错。按照以下步骤进行操作:

    • 选择Follow TCP stream,会看到以下窗口:
    • 显示以下内容:

      • 客户端尝试浏览URI/poker-client/broadcast.htm(如截屏中1和3所示)
      • 状态码为404 Not Found(如截屏中4所示)
        Client errors:
    Code Status Explanation What to do
    500 Internal server error The web server encountered an unexpected condition that prevented it from carrying out the client request for access to the requested URL. Response that is usually caused by a problem in your Perl code when a CGI program is run.
    501 Not implemented The request cannot be executed by the server. A server problem.
    502 Bad gateway The server you're trying to reach is sending back errors. A server problem.
    503 Service unavailable The service or file that is being requested is not currently available. A server problem.
    504 Gateway timeout The gateway has timed out. This message is like the 408 timeout error, but this one occurs at the gateway of the server. Server is down or nonresponsive.
    505 HTTP version not supported The HTTP protocol version that you want to use for communicating with the server is not supported by it. Server does not support the HTTP version.

    服务器不可用(错误代码503)可能有多种原因。以下示例是一个小办公室碰到的问题:员工能够访问Facebook,但当他们点击站点上的链接,则显示页面被拦截。以下截屏中,可看出页面被防火墙拦截:

    标准的HTTP浏览模式如下:

    • TCP打开连接(三路握手信号)
    • HTTP发送GET命令

    当你在packet detail面板没有看到显示内容时,右键报文并选择Follow TCP stream,会看到连接的细节数据。另一个广泛应用的工具是Fiddler,Fiddler是HTTP故障排查的免费工具。

    Network Analysis Using Wireshark Cookbook