users@wadl.java.net

Re: Use case for "header" parameter style

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Fri, 08 Dec 2006 17:04:13 -0500

On Dec 8, 2006, at 2:53 PM, Jerome Louvel wrote:
>
> I am wondering what was the use case for allowing an application to
> add any
> HTTP header to a request or a response. The only case I see is for
> setting/reading some non-standard HTTP headers.
>
Yes, a user requested it as a way to indicate a requirement for a non-
standard header.

> It doesn't seem to me that giving access to such low-level HTTP
> aspects is
> necessary or even a good idea. If an application decides to specify a
> "Content-Length" header for example, what should an implementation
> do? This
> may also conflicts with server-level optimizations, etc.
>
I agree that it is rather open to abuse. OTOH it does allow you to do
things like

<response>
   <param name="location">
     <link resource_type="entry"/>
   </param>
</response>

which describes a bare HTTP 201 response and the type of resource
that is created.

Marc.

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