Cadaver, neon and "Expect: 100"
Joe Orton
joe at manyfish.co.uk
Thu Oct 23 10:37:20 EDT 2008
CC'ing the neon list.
On Thu, Oct 23, 2008 at 04:29:50PM +0200, Henrik Holst wrote:
> I have commited a patch to cadaver which makes use of the expect100
> run-time option which has been available in cadaver for years with out
> actually being used.
>
> Since neon does not support the setting of request flags for the basic
> functions, I had to make a local copy of ne_put() into the cadaver
> source; cadaver_put().
>
> This of course opens up the question whether this should be done in
> cadaver or in neon?! I can see no clean way to make it happen i neon
> other than setting a flag on the session, which doesn't feel clean since
> one perhaps could get the impression that every request from that moment
> on would enable Expect100.
>
> Anyways if this is more acceptable, I have a small patch for that as
> well (only uses the flag for ne_put, ne_post and ne_proppatch since
> Expect100 is only usable when uploading data).
Yeah, I think it would make more sense to do this in neon. I'd propose:
1) add an NE_SESSFLAG_EXPECT100 session flag, defaults to off
2) default NE_REQFLAG_EXPECT100 to the session flag setting for each
request
3) change ne_request.c:build_request() to only add the Expect header
if *both* the NE_REQFLAG_EXPECT100 flag is set, and req->body_length is
non-zero
Does that sound sane? Then we wouldn't need to change ne_put() etc
individually, cadaver can just set the flag for the session and be done.
Regards, Joe
More information about the neon
mailing list