Subject: RE: [Simple] 200 vs. 202

From: Jonathan Rosenberg <[email-masked]>
Date: Thu, 4 Oct 2001 22:27:45 -0400

> -----Original Message-----
> From: Moran Tim (NET/Dallas) [mailto:[email-masked]]
> Sent: Thursday, October 04, 2001 1:17 PM
> To: [email-masked]
> Subject: [Simple] 200 vs. 202
> 
> 
> The Simple presence draft Section 3 states,  "Once authorized, the
> presence agent sends a 202 Accepted response.".  It also 
> states that the
> PA sends an immediate  Notify message.   Section 5.7 states,  "Pending
> occurs when the server cannot obtain authorization ... a pending
> subscription generates a 202 Accepted response". 

Section 3 is in error. It has already been pointed out and has already been
corrected in my running version of -04. The right text is that "If
authorized, the presence agent sends a 200 response"

> 
> For the case of pending authorization,  what is sent 200 or 202? 

202.

> 
> Section  5.7 states that an accepted subscription generates a 200. Now
> if a PA sends a 202 (and an immediate Notify) and the user later
> authorizes the subscription (e.g. manually), is it to send a 200???
> This doesn't make since given 2543 uses the term "final" response for
> 2XX and above. 

No. Lets say the PA has no authorization policy at all. It sends a 202 and a
content-free notify (or something that indicates the status is pending;
yahoo does that). When authorization is obtained, notifications begin with
correct and updated presence state.

> 
> I think some of the answer is that Section 3 is in error and 
> that a 202
> is sent by a PA or a 200 but not both.

Correct.

> If a 202 is sent, the Notify is
> not sent until authorization occurs (i.e. does not have to be
> immediately). 

Compliance with CPIM does require the NOTIFY to be sent even when a 202 is
generated, although I'm not awfully fond of that. 

> If authorization can occur immediately, a 200 is sent
> immediately followed by a Notify. 

Correct.

> Relating to forked subscriptions (5.10), what happens if one of the
> subscribed-to PAs can authorize and wants to send a 200? Does 
> it instead
> send a 202 and immediately send a Notify?  That is, forked-to PAs are
> not allowed to send 200? I presume the PA can tell the 
> request has been
> forked.

I don't understand the problem. Each PUA would decide independely on a
response (200, 202, 600, whatever). The presence server (which is acting as
a proxy now) takes the best response - 200 in this case - and passes it
upstream.

-Jonathan R.
---
Jonathan D. Rosenberg, Ph.D.                72 Eagle Rock Ave.
Chief Scientist                             First Floor
dynamicsoft                                 East Hanover, NJ 07936
[email-masked]                     FAX:   (973) 952-5050
http://www.jdrosen.net                      PHONE: (973) 952-5000
http://www.dynamicsoft.com

---

From: Paul Kyzivat <[email-masked]>
Date: Fri, 05 Oct 2001 09:03:55 -0400

> a proxy now) takes the best response - 200 in this case - and passes it

This seems a little surprising. Wouldn't a proxy normally pass the first
200 class response upstream and cancel the rest? Doing otherwise
requires
the proxy to treat SUBSCRIBE specially.

	Paul