osip-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[osip-dev] Contact header not allowed in BYE and CANCEL


From: FEICHTER Christoph
Subject: [osip-dev] Contact header not allowed in BYE and CANCEL
Date: Mon, 22 Dec 2014 13:59:31 +0000

hi,
 
and one more improvement.
since the BYE and CANCEL requests must not have a Contact header, according to RFC 3261
 
Header field          where   proxy ACK BYE CAN INV OPT REG
___________________________________________________________
Contact                 R            o   -   -   m   o   o
 
eXosip should NOT add a Contact header to these requests.
my suggestion is (jrequest.c, ~ line 984):
 
instead of
  i = _eXosip_request_add_via (excontext, request, transport, locip);
  if (i != 0) {
    osip_message_free (request);
    return i;
  }
 
  /* add specific headers for each kind of request... */
  _eXosip_dialog_add_contact (excontext, request, NULL);
 
 
I would write:
 
  i = _eXosip_request_add_via (excontext, request, transport, locip);
  if (i != 0) {
    osip_message_free (request);
    return i;
  }
 
  /* add specific headers for each kind of request... */
  if ((0 != strcmp ("BYE", method)) &&
      (0 != strcmp ("CANCEL", method)))
  {
     // BYE and CANCEL must not have a Contact-header
    _eXosip_dialog_add_contact (excontext, request, NULL);
  }
 
br,
christoph
 
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]