[sr-dev] Bug in XCAP Server module

Peter Dunkley peter.dunkley at crocodile-rcs.com
Fri Apr 8 23:58:46 CEST 2011


Hello,

I've been testing with a commercial presence and XCAP client and have
discovered a bug in the XCAP Server module.

The HTTP responses sent by the XCAP Server module contain a "SIP-ETag:"
header.  "SIP-ETag:" is the correct header for SIP, but HTTP responses are
supposed to have an "ETag:" header.  See RFC 2616 section 14.19.

Some clients can do a partial match and work with "SIP-ETag:", but the one
I have been testing with is strict and requires the correct header field
name.

This was a simple fix and I have included a diff below.

Regards,

Peter


# diff xcap_server-3.1.3/ xcap_server/
Common subdirectories: xcap_server-3.1.3/doc and xcap_server/doc
diff xcap_server-3.1.3/xcap_server.c xcap_server/xcap_server.c
553,554c553,554
<       etag.s = etag_hdr.s + 10; /* 'SIP-ETag: ' */
<       etag.len = etag_hdr.len - 12; /* 'SIP-ETag: '  '\r\n' */
---
>       etag.s = etag_hdr.s + 6; /* 'ETag: ' */
>       etag.len = etag_hdr.len - 8; /* 'ETag: '  '\r\n' */
657c657
<                       "SIP-ETag: %.*s\r\n", s.len, s.s);
---
>                       "ETag: %.*s\r\n", s.len, s.s);
956,957c956,957
<               etag.s = etag_hdr.s + 10; /* 'SIP-ETag: ' */
<               etag.len = etag_hdr.len - 12; /* 'SIP-ETag: '  '\r\n' */
---
>               etag.s = etag_hdr.s + 6; /* 'ETag: ' */
>               etag.len = etag_hdr.len - 8; /* 'ETag: '  '\r\n' */
1050c1050
<                       "SIP-ETag: sr-%d-%d-%d\r\n", xcaps_init_time,
my_pid(),
---
>                       "ETag: sr-%d-%d-%d\r\n", xcaps_init_time, my_pid(),


-- 
Peter Dunkley
Technical Director
Crocodile RCS Ltd




More information about the sr-dev mailing list