Non-idempotent retry in ne_begin_request()

Joe Orton joe at manyfish.co.uk
Mon Jan 4 06:03:26 EST 2010


On Mon, Jan 04, 2010 at 02:02:02AM +0100, Thomas F wrote:
> Hi,
> 
> I wonder whether ne_begin_request() does the right thing for
> non-idempotent requests: the first send_request() attempt
> can only fail due to server failure (because the connection
> is freshly opened), but is retried nevertheless.
> 
> Shouldn't the retry be suppressed in the non-idempotent case?

send_request() knows to only return NE_RETRY if it is using a persistent 
connection - see the "retry" variable.  The logic here ensures that a 
persistent connection is closed for a non-idempotent request; so 
send_request() should never return NE_RETRY there.  There are a bunch of 
test cases for this so it should work as intended :)

Regards, Joe



More information about the neon mailing list