Module: sip-router Branch: master Commit: f785388e6541e59b5c35a3710bf8d3a41e88a6fe URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f785388e...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Thu Sep 30 14:25:29 2010 +0200
xcap_server: reply 404 when document is not found
---
modules_k/xcap_server/xcap_server.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules_k/xcap_server/xcap_server.c b/modules_k/xcap_server/xcap_server.c index d37c860..302221c 100644 --- a/modules_k/xcap_server/xcap_server.c +++ b/modules_k/xcap_server/xcap_server.c @@ -401,11 +401,12 @@ error: static str xcaps_str_empty = {"", 0}; static str xcaps_str_ok = {"OK", 2}; static str xcaps_str_srverr = {"Server error", 12}; -static str xcaps_str_nocontent = {"No content", 10}; +static str xcaps_str_notfound = {"Not found", 9}; static str xcaps_str_appxml = {"application/xml", 15}; static str xcaps_str_apprlxml = {"application/resource-lists+xml", 30}; static str xcaps_str_apprsxml = {"application/rls-services+xml", 28}; #if 0 +static str xcaps_str_nocontent = {"No content", 10}; static str xcaps_str_appxcxml = {"application/xcap-caps+xml", 25}; #endif static str xcaps_str_appapxml = {"application/auth-policy+xml", 27}; @@ -790,7 +791,7 @@ static int w_xcaps_get(sip_msg_t* msg, char* puri, char* ppath) ctype, &body); } else { /* doc not found */ - xcaps_send_reply(msg, 200, &xcaps_str_nocontent, &xcaps_str_empty, + xcaps_send_reply(msg, 404, &xcaps_str_notfound, &xcaps_str_empty, &xcaps_str_empty, &xcaps_str_empty); } return 1;