[reSIProcate] Bug with Multiple Accept headers

Scott Godin sgodin at sipspectrum.com
Thu May 20 14:11:21 CDT 2010


The code in validateAccept looks right to me - it should be searching all
Accept headers.  In order to get into the code block you mentioned the
following call would have to be returning false:
if(request.exists(h_Accepts))
Given that you see the Accept headers in the BYE message, I'm not sure why
this is failing offhand.  Perhaps the SIPMessage failed to parse properly?
 Maybe the resip logs would reveal more.

Scott

On Thu, May 20, 2010 at 2:19 PM, <aron_rosenberg at logitech.com> wrote:

> So we have an interop issue with another SIP stack relating to that stack
> sending multiple "Accept" headers. Resiprocate is bouncing the BYE message
> with a 406 Not Acceptable error.
>
> The brief snippet from a pcap shows Accept being listed in this exact
> order.
>
> Accept: application/sdp,application/media_control+xml\r\n
> Accept: application/presentation_token_control+xml\r\n
>
> The same set of headers is allowed in the initial INVITE.
>
> I believe what is happening is that DialogUsageManager::validateAccept(
> const SipMessage& request) isn't properly searching multiple Accept header
> lines and it's falling into this block of code
>
> // If no Accept header then application/sdp should be assumed for certain
> methods
> else if(method == INVITE ||
> method == OPTIONS ||
> method == PRACK ||
> method == UPDATE)
> {
> if(getMasterProfile()->isMimeTypeSupported(request.header(h_RequestLine).method(),
> Mime("application", "sdp")))
> {
> return true;
> }
> }
>
> But in this case, BYE is not an option, so it bounces the message.
>
> A very simple fix would be to add BYE to that list, but are multiple Accept
> headers legal? If so, then the logic higher up in validateAccept needs to be
> changed to search more than just the last header line.
>
> Which is the right approach?
>
> Aron Rosenberg
> Logitech Inc, (SightSpeed Group)
>
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel at resiprocate.org
> https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20100520/ae41333c/attachment.htm>


More information about the resiprocate-devel mailing list