joelf68 / imsdroid

Automatically exported from code.google.com/p/imsdroid
0 stars 0 forks source link

Missing "Expires" header in subscribe/unsubscribe request #65

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Start IMSDroid and activate presence
2.Enable presence

What is the expected output? What do you see instead?
The Expires header for SUBSCRIBE requests is missing.
It is set only in Contact header as parameter, but should be set as an 
"Expires" header according to RFC 3265:

3.1.1. Subscription Duration

   SUBSCRIBE requests SHOULD contain an "Expires" header (defined in SIP
   [1]).  This expires value indicates the duration of the subscription.
   In order to keep subscriptions effective beyond the duration
   communicated in the "Expires" header, subscribers need to refresh
   subscriptions on a periodic basis using a new SUBSCRIBE message on
   the same dialog as defined in SIP [1].

   If no "Expires" header is present in a SUBSCRIBE request, the implied
   default is defined by the event package being used.

   200-class responses to SUBSCRIBE requests also MUST contain an
   "Expires" header.  The period of time in the response MAY be shorter
   but MUST NOT be longer than specified in the request.  The period of
   time in the response is the one which defines the duration of the
   subscription.

   An "expires" parameter on the "Contact" header has no semantics for
   SUBSCRIBE and is explicitly not equivalent to an "Expires" header in
   a SUBSCRIBE request or response.

   A natural consequence of this scheme is that a SUBSCRIBE with an
   "Expires" of 0 constitutes a request to unsubscribe from an event.

      In addition to being a request to unsubscribe, a SUBSCRIBE message
      with "Expires" of 0 also causes a fetch of state; see section
      3.3.6.

   Notifiers may also wish to cancel subscriptions to events; this is
   useful, for example, when the resource to which a subscription refers
   is no longer available.  Further details on this mechanism are
   discussed in section 3.2.2.

What version of the product are you using? On what operating system?
imsdroid-1.0.285

Original issue reported on code.google.com by cedric.d...@gmail.com on 20 Sep 2010 at 7:48

GoogleCodeExporter commented 9 years ago
You are right. Fix will be part of the next release.

Original comment by boss...@yahoo.fr on 21 Sep 2010 at 5:28

GoogleCodeExporter commented 9 years ago
SVN revision 288 solve the issue.

Original comment by boss...@yahoo.fr on 21 Sep 2010 at 10:32

GoogleCodeExporter commented 9 years ago
Thanks!

Original comment by cedric.d...@gmail.com on 21 Sep 2010 at 2:49

GoogleCodeExporter commented 9 years ago
Fixed in 1.0.292.

Original comment by boss...@yahoo.fr on 28 Sep 2010 at 9:29

GoogleCodeExporter commented 9 years ago

Original comment by boss...@yahoo.fr on 28 Sep 2010 at 9:34