426(需要升级)状态码表明服务器拒绝使用当前协议的请求,但是可能愿意在客户端升级到一个不同的协议后这么做。服务器必须在426响应中发送Upgrade头字段来指明被请求的协议(RFC7230,6.7节)。

    例子:

    1. HTTP/1.1 426 Upgrade Required
    2. Upgrade: HTTP/3.0
    3. Connection: Upgrade
    4. Content-Length: 53
    5. Content-Type: text/plain
    6. This service requires use of the HTTP/3.0 protocol.