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/include/pjsip/sip_parser.h

    r583 r606  
    315315    pjsip_HEX_SPEC,             /**< Hexadecimal digits. */ 
    316316    pjsip_PARAM_CHAR_SPEC,      /**< For scanning pname (or pvalue when it's  
    317                                      not quoted.) */ 
     317                                     not quoted.) in URI */ 
    318318    pjsip_PARAM_CHAR_SPEC_ESC,  /**< Variant without the escape ('%') char */ 
    319319    pjsip_HDR_CHAR_SPEC,        /**< Chars in hname/havalue in URL. */ 
     
    357357}; 
    358358 
     359/* Parse parameter in header (matching the character as token) */ 
    359360void pjsip_parse_param_imp(  pj_scanner *scanner, pj_pool_t *pool, 
    360361                             pj_str_t *pname, pj_str_t *pvalue, 
    361362                             unsigned opt); 
     363/* Parse parameter in URL (matching the character as paramchar) */ 
     364void pjsip_parse_uri_param_imp(  pj_scanner *scanner, pj_pool_t *pool, 
     365                                 pj_str_t *pname, pj_str_t *pvalue, 
     366                                 unsigned opt); 
    362367void pjsip_concat_param_imp( pj_str_t *param, pj_pool_t *pool,  
    363                          const pj_str_t *pname, const pj_str_t *pvalue, int sepchar); 
     368                             const pj_str_t *pname, const pj_str_t *pvalue,  
     369                             int sepchar); 
    364370void pjsip_parse_end_hdr_imp ( pj_scanner *scanner ); 
    365371 
Note: See TracChangeset for help on using the changeset viewer.