[reSIProcate] no Contact allowed in MESSAGE
As per RFC 3428, section 4:
MESSAGE requests do not initiate dialogs. User Agents MUST NOT
insert Contact header fields into MESSAGE requests.
Accordingly, I think the following change should be made to
Dialog::makeRequest() (diff from Dialog.cxx, version 1.9.6 attached):
request.remove(h_Contacts);
if (method != MESSAGE) // RFC 3428, section 4: no Contact allowed in
MESSAGE
{
request.header(h_Contacts).push_front(mLocalContact);
}
Index: Dialog.cxx
===================================================================
--- Dialog.cxx (revision 27435)
+++ Dialog.cxx (working copy)
@@ -1010,7 +1010,10 @@
request.remove(h_Replaces);
request.remove(h_Contacts);
- request.header(h_Contacts).push_front(mLocalContact);
+ if (method != MESSAGE) // RFC 3428, section 4: no Contact allowed in MESSAGE
+ {
+ request.header(h_Contacts).push_front(mLocalContact);
+ }
request.header(h_CSeq).method() = method;
request.header(h_MaxForwards).value() = 70;