Changeset 4424 for pjproject


Ignore:
Timestamp:
Mar 6, 2013 6:58:40 AM (12 years ago)
Author:
ming
Message:

Fixed #1632: Remove Contact header in MESSAGE requests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_im.c

    r4173 r4424  
    513513    pjsip_tx_data *tdata; 
    514514    const pj_str_t mime_text_plain = pj_str("text/plain"); 
    515     const pj_str_t STR_CONTACT = { "Contact", 7 }; 
    516515    pjsip_media_type media_type; 
    517516    pjsua_im_data *im_data; 
    518517    pjsua_acc *acc; 
    519     pj_str_t contact; 
    520518    pj_status_t status; 
    521519 
     
    552550     * set in the account. 
    553551     */ 
     552    /* Ticket #1632: According to RFC 3428: 
     553     * MESSAGE requests do not initiate dialogs. 
     554     * User Agents MUST NOT insert Contact header fields into MESSAGE requests 
     555     */ 
     556    /* 
    554557    if (acc->contact.slen) { 
    555558        contact = acc->contact; 
     
    566569        pjsip_generic_string_hdr_create(tdata->pool,  
    567570                                        &STR_CONTACT, &contact)); 
     571    */ 
    568572 
    569573    /* Create IM data to keep message details and give it back to 
     
    628632                                     const pjsua_msg_data *msg_data) 
    629633{ 
    630     const pj_str_t STR_CONTACT = { "Contact", 7 }; 
    631634    pjsua_im_data *im_data; 
    632635    pjsip_tx_data *tdata; 
    633636    pjsua_acc *acc; 
    634     pj_str_t contact; 
    635637    pj_status_t status; 
    636638 
     
    665667     * set in the account. 
    666668     */ 
     669    /* Ticket #1632: According to RFC 3428: 
     670     * MESSAGE requests do not initiate dialogs. 
     671     * User Agents MUST NOT insert Contact header fields into MESSAGE requests 
     672     */ 
     673    /* 
    667674    if (acc->contact.slen) { 
    668675        contact = acc->contact; 
     
    679686        pjsip_generic_string_hdr_create(tdata->pool,  
    680687                                        &STR_CONTACT, &contact)); 
    681  
     688    */ 
    682689 
    683690    /* Create "application/im-iscomposing+xml" msg body. */ 
Note: See TracChangeset for help on using the changeset viewer.