Module: sip-router
Branch: master
Commit: a20da4ced92796959d619adb6ba61334869f8588
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a20da4c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Mon Apr 11 12:02:23 2011 +0200
xcap_server: use ETag header instead of SIP-ETag
- over http the name of header carrying entity tag is ETag
- patch by Peter Dunkley
---
modules_k/xcap_server/xcap_server.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/modules_k/xcap_server/xcap_server.c b/modules_k/xcap_server/xcap_server.c
index 302221c..92c3178 100644
--- a/modules_k/xcap_server/xcap_server.c
+++ b/modules_k/xcap_server/xcap_server.c
@@ -550,8 +550,8 @@ static int w_xcaps_put(sip_msg_t* msg, char* puri, char* ppath,
LM_ERR("could not generate etag\n");
goto error;
}
- 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' */
if(xcaps_put_db(&turi.user, &turi.host,
&xuri, &etag, &body)<0)
{
@@ -654,7 +654,7 @@ static int xcaps_get_db(str* user, str *domain, xcap_uri_t *xuri,
goto error;
}
etag->len = snprintf(xcaps_etag_buf, XCAPS_ETAG_SIZE,
- "SIP-ETag: %.*s\r\n", s.len, s.s);
+ "ETag: %.*s\r\n", s.len, s.s);
if(etag->len < 0)
{
LM_ERR("error printing etag hdr\n ");
@@ -953,8 +953,8 @@ static int w_xcaps_del(sip_msg_t* msg, char* puri, char* ppath)
LM_ERR("could not generate etag\n");
goto error;
}
- 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' */
if(xcaps_put_db(&turi.user, &turi.host,
&xuri, &etag, &body)<0)
{
@@ -1047,7 +1047,7 @@ done:
int xcaps_generate_etag_hdr(str *etag)
{
etag->len = snprintf(xcaps_etag_buf, XCAPS_ETAG_SIZE,
- "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(),
xcaps_etag_counter++);
if(etag->len <0)
{