users@jsr311.java.net

Re: Request.evaluateConditions(EntityTag)

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Fri, 18 Sep 2009 13:19:59 -0400

On Sep 18, 2009, at 12:53 PM, Sergey Beryozkin wrote:
>
> Following my question about
> Request.evaluatePreconditions() (thanks Marc for the answer) I'd
> like to clarify how Request.evaluateConditions(EntityTag) (and
> similarly with Date being the arg) should act.
>
> There could be
>
> If-Match : something
> and
> If-Non-Match : something
>
> Request.evaluateConditions(EntityTag) can detect that a user
> provided value matches either that of If-Match or If-Non-Match.
>
> Should Request.evaluateConditions(EntityTag) return null if a
> provided tag value matches either that of If-Match or If-Non-Match ?
> Or null if it matches If-Match and not matches If-Non-Match ?
>

Request.evaluatePreconditions("something")

If-Match: something -> null // if (functionValue matches headervalue)
If-Match: somethingelse -> non-null
If-None-Match: something -> non-null // if (functionValue doesn't
match headervalue)
If-None-Match: somethingelse -> null

Its basically like an if statement with true returning null and false
returning a Response.

Marc.

> thanks, Sergey
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: users-help_at_jsr311.dev.java.net
>