The server is required to send the appropriate PUSH_PROMISE frame to the client in a new stream. It is required to make a followup call to the app to initiate a request matching the given headers so that the application can fulfill the response it promised.
This way an application can check to see if the protocol is HTTP/2. If it is, it can spew out whatever pushes should be initiated for the current request. If not, the client should end up making those requests anyway and can be fulfilled by the application the same way when either the client requests it or the server pushes it.
Basically, the push-promise should only be used to emit a list of pairs, describing the request header. This looks something like:
The server is required to send the appropriate
PUSH_PROMISE
frame to the client in a new stream. It is required to make a followup call to the app to initiate a request matching the given headers so that the application can fulfill the response it promised.This way an application can check to see if the protocol is HTTP/2. If it is, it can spew out whatever pushes should be initiated for the current request. If not, the client should end up making those requests anyway and can be fulfilled by the application the same way when either the client requests it or the server pushes it.