dev@jsr311.java.net

Re: JSR311: No _at_OPTIONS _at_TRACE

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Tue, 22 Jan 2008 10:53:42 -0500

On Jan 22, 2008, at 4:20 AM, Paul Sandoz wrote:
>
> I agree with @OPTIONS. Note that OPTIONS is supported by default if
> the developer does not support it (like HEAD).
>
I disagree, writing an OPTIONS method seems like pretty advanced use-
case given that OPTIONS is already automatically supported by a JAX-RS
runtime. I'd prefer to leave OPTIONS out of the API for now (we can
always add it later if it turns out that lots of folks need it) since
its pretty easy to add your own OPTIONS annotation if you really need
it.

> In addition i think @HttpMethod should also be allowed on methods,
> thus a developer does not have to create a new annotation for
> supporting a new method, like @PATCH.
>
I disagree, I think its already easy enough to create your own
annotation for a new HTTP method and there's no need to allow
@HttpMethod on methods directly.

> Not sure about an annotation for TRACE [1]. IIUC this is very
> specific functionality w.r.t. the origin server:
>
> TRACE allows the client to see what is being received at the other
> end
> of the request chain and use that data for testing or diagnostic
> information.
>
> ...
>
> If the request is valid, the response SHOULD contain the entire
> request message in the entity-body, with a Content-Type of
> "message/http". Responses to this method MUST NOT be cached.
>
> It is very unlikely that a developer will want to implement this
> themselves. If fact i am wondering if we should allow developers to
> implement this at all. I think the JAX-RS runtime should provide
> support this method.
>
I agree, I don't see any need for a JAX-RS user to implement TRACE,
that would be something for the container or JAX-RS runtime.

Marc.

> Bill Burke wrote:
>> Might as well be complete...
>
> --
> | ? + ? = To question
> ----------------\
> Paul Sandoz
> x38109
> +33-4-76188109
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: users-help_at_jsr311.dev.java.net
>

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.