So, the 3 element response makes sense for HTTP/1.0 and HTTP/1.1. It mostly makes sense for HTTP/2 as well. It does not make any sense for WebSocket. For those responses, it might be most sensible to just return the Supply and skip the headers. This might be a general note, that the response expected from the Promise depends upon the contents of SERVER_PROTOCOL.
It would be the server's responsibility, then, to detect non-sensical responses to protocol extensions. It might also be a place where we again want to consider some sort of configuration API be layered on to pre-declare which protocols an application actually is able to support.
So, the 3 element response makes sense for HTTP/1.0 and HTTP/1.1. It mostly makes sense for HTTP/2 as well. It does not make any sense for WebSocket. For those responses, it might be most sensible to just return the Supply and skip the headers. This might be a general note, that the response expected from the Promise depends upon the contents of
SERVER_PROTOCOL
.It would be the server's responsibility, then, to detect non-sensical responses to protocol extensions. It might also be a place where we again want to consider some sort of configuration API be layered on to pre-declare which protocols an application actually is able to support.