Opened 13 years ago

Closed 13 years ago

#1156 closed enhancement (fixed)

New option to ignore bad NOTIFY presence message body (thanks Johan Lantz for the suggestion)

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-1.8.10
Component: pjsip Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description

Currently bad NOTIFY message body (for presence) will be responded automatically with 488 (Not Acceptable Here), and application callback will not be called. Sample of bad NOTIFY requests:

  • NOTIFY containing non-PIDF/X-PIDF
  • NOTIFY with multipart message bodies but without PIDF/X-PIDF part
  • NOTIFY containing bad PIDF/X-PIDF document

This ticket adds PJSIP_PRES_BAD_CONTENT_RESPONSE compile time setting with the following spec:

/**
 * Specify the status code value to respond to bad message body in NOTIFY
 * request for presence. Scenarios that are considered bad include non-
 * PIDF/XML and non-XPIDF/XML body, multipart message bodies without PIDF/XML
 * nor XPIDF/XML part, and bad (parsing error) PIDF and X-PIDF bodies
 * themselves.
 *
 * Default value is 488. Application may change this to 200 to ignore the
 * Unrecognised content (this is useful if the application wishes to handle
 * the content itself). Only non-3xx final response code is allowed here.
 *
 * Default: 488 (Not Acceptable Here)
 */
#ifndef PJSIP_PRES_BAD_CONTENT_RESPONSE
#   define PJSIP_PRES_BAD_CONTENT_RESPONSE	488
#endif

Change History (1)

comment:1 Changed 13 years ago by bennylp

  • Resolution set to fixed
  • Status changed from new to closed

(In [3363]) Fixed #1156: New option to ignore bad NOTIFY presence message body (thanks Johan Lantz for the suggestion)

Note: See TracTickets for help on using tickets.