users@wadl.java.net

RE: Use case for "header" parameter style

From: Jerome Louvel <contact_at_noelios.com>
Date: Sat, 9 Dec 2006 10:12:25 +0100

Hi Marc,

It would then we a good idea to restrict the usage of this "header"
parameter style to non-standard HTTP headers only. I had the same request
for the Restlet API and made the suggested restriction with no problem so
far.

For the "Location" header, as it is a common and important concept, it could
have its own WADL element, in addition to the "fault" and "representation"
elements.

Best regards,
Jerome

> -----Message d'origine-----
> De : Marc.Hadley_at_Sun.COM [mailto:Marc.Hadley_at_Sun.COM]
> Envoyé : vendredi 8 décembre 2006 23:33
> À : users_at_wadl.dev.java.net
> Objet : Re: Use case for "header" parameter style
>
> I just noticed I missed the @style="header" on the param element.
>
> On Dec 8, 2006, at 5:04 PM, Marc Hadley wrote:
>
> > 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.
> >
> >
>
> ---
> Marc Hadley <marc.hadley at sun.com>
> CTO Office, Sun Microsystems.
>
>
>