jsr369-experts@servlet-spec.java.net

[jsr369-experts] PushBuilder#method

From: Shing Wai Chan <shing.wai.chan_at_oracle.com>
Date: Tue, 14 Feb 2017 15:46:29 -0800

According section 8.2 of RFC 7540, a promised request must be cacheable and safe without a request body.
For request methods defined in RFC 7231, only GET and HEAD are cacheable and safe.
So, one cannot push
    POST, PUT, DELETE, CONNECT, OPTIONS and TRACE. (*)
Since there are custom http methods, there may be others cacheable and safe methods,

In PushBuilder#method, what will happen when methods in (*) are applied?
The current javadoc seems to accept the methods in (*) above.
Should we throw IllegalArgumentException in this case?

Shing Wai Chan