Ignore:
Timestamp:
Jul 17, 2006 10:04:12 AM (18 years ago)
Author:
bennylp
Message:

Fixed bugs with the parsing (re: allowable chars): (1) Parameters in URI and header should have different spec. URI should use paramchar spec while header should use token spec (thanks Jeroen van Bemmel) (2) The same rule applies when escaping the parameters during printing process (3) While we're on it, also fixed the tel-URI parser to automatically unescape the parameter values.

File:
1 edited

Legend:

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

    r583 r606  
    10401040 
    10411041        printed = pjsip_param_print_on(&hdr->other_param, buf, endbuf-buf, 
    1042                                        &pjsip_PARAM_CHAR_SPEC, 
    1043                                        &pjsip_PARAM_CHAR_SPEC, ';'); 
     1042                                       &pjsip_TOKEN_SPEC, &pjsip_TOKEN_SPEC,  
     1043                                       ';'); 
    10441044        if (printed < 0) 
    10451045            return printed; 
     
    12831283 
    12841284    printed = pjsip_param_print_on(&hdr->other_param, buf, endbuf-buf,  
    1285                                    &pjsip_PARAM_CHAR_SPEC, 
    1286                                    &pjsip_PARAM_CHAR_SPEC, ';'); 
     1285                                   &pjsip_TOKEN_SPEC, 
     1286                                   &pjsip_TOKEN_SPEC, ';'); 
    12871287    if (printed < 0) 
    12881288        return -1; 
     
    14541454 
    14551455    printed = pjsip_param_print_on(&hdr->other_param, buf, endbuf-buf,  
    1456                                    &pjsip_PARAM_CHAR_SPEC,  
    1457                                    &pjsip_PARAM_CHAR_SPEC, ';'); 
     1456                                   &pjsip_TOKEN_SPEC,  
     1457                                   &pjsip_TOKEN_SPEC, ';'); 
    14581458    if (printed < 0) 
    14591459        return -1; 
     
    16731673     
    16741674    printed = pjsip_param_print_on(&hdr->other_param, buf, endbuf-buf,  
    1675                                    &pjsip_PARAM_CHAR_SPEC, 
    1676                                    &pjsip_PARAM_CHAR_SPEC, ';'); 
     1675                                   &pjsip_TOKEN_SPEC, 
     1676                                   &pjsip_TOKEN_SPEC, ';'); 
    16771677    if (printed < 0) 
    16781678        return -1; 
Note: See TracChangeset for help on using the changeset viewer.