jsr369-experts@servlet-spec.java.net

[jsr369-experts] Pushbuilder clarifications/comments

From: Martin Mulholland <mmulholl_at_us.ibm.com>
Date: Tue, 7 Feb 2017 17:04:52 -0500

Hi,

I am looking at the PushBuilder api and think we need some clarifications
and/or updates. This is mostly based on the javadoc with the first draft
so apologize if these things have already been covered, but I couldn't
find anything in the history:

In no particular order.

- pushBuilder.getHeaderNames() returns Set<String> whereas the same method
on HttpServlerRequest returns an Enumeration<String>. This is inconsistent
and pushBuilder should also return an enumeration.

- pushBuilder.push() involves a request and a response which makes, for
example, the pushBuilder.setHeader() method ambiguous. Is it setting
header for the request or the response? If it is the request what if a
response header is set, if it is the response what if a response header is
set, if it is based on the type of header what if a general header is set?

- Should the pushbuilder.setMethod() API not throw an
unsupportedMethodException for invalid methods?

- The javadoc says that the eTag and lastModified values must be cleared
after a call to push, if associated headers were set I assume they should
also be cleared.



Thank you,
Martin Mulholland.
WebSphere Application Server Web Tier Architect
email: mmulholl_at_us.ibm.com