Changeset 3329
- Timestamp:
- Oct 1, 2010 12:24:23 AM (14 years ago)
- Location:
- pjproject/trunk/pjsip
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsip/sip_config.h
r3182 r3329 69 69 typedef struct pjsip_cfg_t 70 70 { 71 /** Global settings. */ 72 struct { 73 /** 74 * Specify port number should be allowed to appear in To and From 75 * header. Note that RFC 3261 disallow this, see Table 1 in section 76 * 19.1.1 of the RFC. Default is PJSIP_ALLOW_PORT_IN_FROMTO_HDR. 77 */ 78 pj_bool_t allow_port_in_fromto_hdr; 79 80 } endpt; 81 71 82 /** Transaction layer settings. */ 72 83 struct { … … 362 373 363 374 /** 375 * Specify port number should be allowed to appear in To and From 376 * header. Note that RFC 3261 disallow this, see Table 1 in section 377 * 19.1.1 of the RFC. This setting can also be altered at run-time 378 * via pjsip_cfg setting, see pjsip_cfg_t.allow_port_in_fromto_hdr 379 * field. 380 * 381 * Default: 0 382 */ 383 #ifndef PJSIP_ALLOW_PORT_IN_FROMTO_HDR 384 # define PJSIP_ALLOW_PORT_IN_FROMTO_HDR 0 385 #endif 386 387 /** 364 388 * This macro controls maximum numbers of ioqueue events to be processed 365 389 * in a single pjsip_endpt_handle_events() poll. When PJSIP detects that -
pjproject/trunk/pjsip/src/pjsip/sip_config.c
r2394 r3329 24 24 pjsip_cfg_t pjsip_sip_cfg_var = 25 25 { 26 /* Global settings */ 27 { 28 PJSIP_ALLOW_PORT_IN_FROMTO_HDR 29 }, 30 26 31 /* Transaction settings */ 27 32 { -
pjproject/trunk/pjsip/src/pjsip/sip_uri.c
r3242 r3329 289 289 290 290 /* Only print port if it is explicitly specified. 291 * Port is not allowed in To and From header. 292 */ 293 /* Unfortunately some UA requires us to send back the port 294 * number exactly as it was sent. We don't remember whether an 295 * UA has sent us port, so we'll just send the port indiscrimately 296 */ 297 //PJ_TODO(SHOULD_DISALLOW_URI_PORT_IN_FROM_TO_HEADER) 298 if (url->port && context != PJSIP_URI_IN_FROMTO_HDR) { 291 * Port is not allowed in To and From header, see Table 1 in 292 * RFC 3261 Section 19.1.1 293 */ 294 /* Note: ticket #1141 adds run-time setting to allow port number to 295 * appear in From/To header. Default is still false. 296 */ 297 if (url->port && 298 (context != PJSIP_URI_IN_FROMTO_HDR || 299 pjsip_cfg()->endpt.allow_port_in_fromto_hdr)) 300 { 299 301 if (endbuf - buf < 10) 300 302 return -1;
Note: See TracChangeset
for help on using the changeset viewer.