users@servlet-spec.java.net

[servlet-spec users] [jsr369-experts]

From: Shing Wai Chan <shing.wai.chan_at_oracle.com>
Date: Wed, 1 Mar 2017 20:35:27 -0800

In javadoc of PushBuilder, it has the following (A):

 * <li>If this request has either of the conditional headers
 * "If-Modified-Since" or "If-None-Match", then {_at_link #isConditional()}
 * must return {_at_code true}.</li>

I have the following questions:
(a) According to section 3.3 of RFC 7232, we can have “If-Modified-Since” and “If-None-Match” together
     for interoperating with older intermediaries and “If-Modified-Since” will be ignored in this case.

        So, we may like to change (A) (by removing of “either”):
         * <li>If this request has the conditional headers
         * "If-Modified-Since" or "If-None-Match", then {_at_link #isConditional()}
         * must return {_at_code true}.</li>

(b) What about other conditional headers (If-Match, If-Unmodified-Since, If-Range) defined in RFC 7232?
     If we decide to include these headers as conditional, then we may like to change (A) as follows:

         * <li>If this request has any of the conditional headers
         * defined in RFC 7232 such as “If-Modified-Since”, “If-Non-Match”, then {_at_link #isConditional()}
         * must return {_at_code true}.</li>

    Also, right now we only have two APIs for conditional headers, #eTag(String) and #lastModified(String).
    Do we suppose to include the other three?
    If yes, then should we rename the above two methods to match the header name?
        ie. #ifModifiedSince(String), #ifNonMatch(String)
    And we will need to add #ifMatch(String), #ifUnmodifiedSince(String), #ifRange(String)

Any comment?
Shing Wai Chan