Re: Content negotiation for request bodies

On Fri, 15 Feb 2008, Adrien de Croy wrote:

> Simply because the first agent to send a message is the client (rather
> than the server), the server can know advertised client capabilities
> (i.e. Accept- headers) before choosing to send a resource that
> complies.  The client however cannot know what the server supports,
> because the server has not had an opportunity to advertise any
> capability.  There's no server welcome message.  So clients send message
> bodies blindly, whereas servers send message bodies with knowledge.

Well it would be rare for a client to send a significantly sized request
body without a previous interaction with the server or one if its peers
in the web based application. It is not uncommon for a web page to direct
an upload or post transaction to another server, but the html page source
should be aware of target's capabilities. A browser should be able to
infer server capabilities from previous responses. If needed, we can
perhaps add some kind of hint of server preferences along with
implementation 'advice' which suggests that clients remember prior
experience with a server for a modest interval.

This should reduce error case to a few stupid servers which don't provide
proper clues.  Tring what is likely to succeed based on history with the
server or its application peers will actually have a very low error rate.

Even non-browser clients can be expected to have or acquire knowledge
as to a server's capabilities.

It would also help if HTML Forms, etc. had the ability to express server
preferences.

Dave Morris

Received on Sunday, 24 February 2008 02:05:11 UTC