Re: estimated Content-Length with chunked encoding wrote:
> >> Does it work in practice?
> >
> > I think this is a case that would work if things worked the way we
> > understand
> > them and read the RFC, but in practise I believe the 100-continue support
> > in
> > the wild is not implemented this cleverly. I think a vast amount of
> > 100-continue responses are just not doing any checks at all but simply
> > respond
> > OK-continue without consideration. And then there's the opposite - servers
> > that don't like 100-continue at all but would support a chunked-request.
> >
> > I say "think" here because this is just my gut feeling, I haven't actually
> > tested the theory.
> In my experience, chunked requests are nowadays much better supported than
> proper 100-continue behaviour. So it will probably be safe to deduce the
> former from the latter, but one misses out on some servers.
> The reason for this is that chunked requests can be implemented often in
> some quite isolated server code while proper 100-continue needs to reach
> up through all API layers (until it crashes into the servlet api for
> example which does not support it).
> I say "proper" because some server just send out 100-continue whenever
> they see an Expect header without consulting authentication or even the
> application layer itself.

Servers sending "100 Continue" without further checks isn't actually
_wrong_, it's just sub-optimal performance.

The only "missed server" opportunities are those which _don't_ send
"100 Continue", which both Stefan and Daniel think is not the likely
issue - the likely issue being they they _do_ send without checking.

If that's the case, the remaining problem is servers which are too
slow to respond.  You could wait a bit longer before sending, if you
have such a large request body that chunking is worth doing, or if
prior behaviour suggests the server normally sends "100 Continue";
it's not perfect but a heuristic.

I think a bigger issue would be proxies accepting chunked requests,
and not properly converting them to unchunked when the upstream server
does not accept chunked.  Good proxies would convert, of course.

-- Jamie

Received on Friday, 14 November 2008 13:32:16 UTC