Changeset 1345


Ignore:
Timestamp:
Jun 7, 2007 12:51:40 PM (12 years ago)
Author:
bennylp
Message:

Ticket #324: Allow '#' character in the user part of URI of incoming message (thanks Esbjörn Dominique)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_parser.c

    r1269 r1345  
    125125            pjsip_USER_SPEC,            /* User */ 
    126126            pjsip_USER_SPEC_ESC,        /* Variant without escaped char */ 
     127            pjsip_USER_SPEC_LENIENT,    /* User, with additional '#' char */ 
     128            pjsip_USER_SPEC_LENIENT_ESC, 
    127129            pjsip_NOT_COMMA_OR_NEWLINE, /* Array separator. */ 
    128130            pjsip_NOT_NEWLINE,          /* For eating up header.*/ 
     
    362364    pj_cis_del_str( &pjsip_USER_SPEC_ESC, ESCAPED); 
    363365 
     366    status = pj_cis_dup(&pjsip_USER_SPEC_LENIENT, &pjsip_USER_SPEC); 
     367    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status); 
     368    pj_cis_add_str(&pjsip_USER_SPEC_LENIENT, "#"); 
     369 
     370    status = pj_cis_dup(&pjsip_USER_SPEC_LENIENT_ESC, &pjsip_USER_SPEC_ESC); 
     371    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status); 
     372    pj_cis_add_str(&pjsip_USER_SPEC_LENIENT_ESC, "#"); 
     373 
    364374    status = pj_cis_dup(&pjsip_PASSWD_SPEC, &pjsip_ALNUM_SPEC); 
    365375    PJ_ASSERT_RETURN(status == PJ_SUCCESS, status); 
     
    12091219                                 pj_str_t *user, pj_str_t *pass) 
    12101220{ 
    1211     parser_get_and_unescape(scanner, pool, &pjsip_USER_SPEC,  
    1212                             &pjsip_USER_SPEC_ESC, user); 
     1221    parser_get_and_unescape(scanner, pool, &pjsip_USER_SPEC_LENIENT,  
     1222                            &pjsip_USER_SPEC_LENIENT_ESC, user); 
    12131223 
    12141224    if ( *scanner->curptr == ':') { 
Note: See TracChangeset for help on using the changeset viewer.