I also don't see a need for request#completedPushRequest.
I have a different question.
Do we need to whether the push is completed or failed?
Shing Wai Chan
On 9/8/14, 2:33 PM, Stuart Douglas wrote:
>
>> Greg, you already intimated this requirement but I wanted to make it
>> explicit for discussion. I perceive a side-effect of this requirement:
>> the container needs to know when all the PUSH_PROMISE frames pertaining
>> to this request have been sent, so it can commence sending the HTML
>> bytes. I've added a request.completedPushRequest() method for this
>> case.
>
> I don't really see the need for the completedPushRequest() method. In
> particular there is no requirement in the spec that all push promises
> are sent before any HTML is sent, only that the promise should be sent
> before we send any HTML that references these resources.
>
> For example consider the case of a footer that is generated from a
> servlet include. This footer has an image that should be sent via push
> promise, but the calling page has no way of knowing that, and it is
> perfectly legitimate to start sending the page HTML, as long as the
> push promise arrives before the bit of the footer that references the
> image.
>
> I think that for the most part we should just make this a user level
> concern. We should require that if dispatchPushRequest() is called
> then the push promise will be sent on the wire before any data that is
> written after the call, but other than that it is up to the end user
> to make sure that they push resources before sending the html.
>
> Stuart
>
>>
>> I've added a wiki page with a diagram for discussion:
>>
>> https://java.net/projects/servlet-spec/pages/PushAPI
>>
>> Thoughts?
>>
>> Thanks,
>>
>> Ed