kamailio.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
List overview
Download
sr-dev
October 2012
----- 2024 -----
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
sr-dev@lists.kamailio.org
31 participants
241 discussions
Start a n
N
ew thread
git:master: modules_k/xcap_server: Added explicit parsing of headers before looking for HTTP ETag and Host headers
by Peter Dunkley
Module: sip-router Branch: master Commit: a4f28b9707b2c55af87138cca531fdb1badd7023 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a4f28b9…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com> Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com> Date: Thu Oct 25 20:17:48 2012 +0100 modules_k/xcap_server: Added explicit parsing of headers before looking for HTTP ETag and Host headers --- modules_k/xcap_server/xcap_server.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/modules_k/xcap_server/xcap_server.c b/modules_k/xcap_server/xcap_server.c index 3d0be18..8a8b228 100644 --- a/modules_k/xcap_server/xcap_server.c +++ b/modules_k/xcap_server/xcap_server.c @@ -915,6 +915,12 @@ static int xcaps_get_directory(struct sip_msg *msg, str *user, str *domain, str if (db_res == NULL) goto error; + if (parse_headers(msg, HDR_EOH_F, 0) < 0) + { + LM_ERR("error parsing headers\n"); + goto error; + } + while (hdr != NULL) { if (cmp_hdrname_strzn(&hdr->name, "Host", 4) == 0) @@ -1490,6 +1496,12 @@ static int check_preconditions(sip_msg_t *msg, str etag_hdr) int matched_matched=0; int matched_nonematched=0; + if (parse_headers(msg, HDR_EOH_F, 0) < 0) + { + LM_ERR("error parsing headers\n"); + return 1; + } + if (etag_hdr.len > 0) { str etag;
12 years
1
0
0
0
git:master: modules_k/auth_db: Added an optional parameter for method to www_authenticate
by Peter Dunkley
Module: sip-router Branch: master Commit: 5c71412cf3530f19edc4bee38cc9c3857ddc1eb0 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5c71412…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com> Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com> Date: Thu Oct 25 19:44:32 2012 +0100 modules_k/auth_db: Added an optional parameter for method to www_authenticate --- modules_k/auth_db/README | 56 +++++++++++++++-------------- modules_k/auth_db/api.h | 2 +- modules_k/auth_db/authdb_mod.c | 4 ++- modules_k/auth_db/authorize.c | 59 +++++++++++++++++++++++++++---- modules_k/auth_db/authorize.h | 2 +- modules_k/auth_db/doc/auth_db_admin.xml | 7 +++- 6 files changed, 92 insertions(+), 38 deletions(-) Diff:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=5c7…
12 years
1
0
0
0
git:master: modules/app_lua: Updated because of recent changes to auth and auth_db
by Peter Dunkley
Module: sip-router Branch: master Commit: 53175995fb7fe7d760c063c4d542e991c1513344 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=5317599…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com> Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com> Date: Thu Oct 25 19:45:04 2012 +0100 modules/app_lua: Updated because of recent changes to auth and auth_db --- modules/app_lua/app_lua_exp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/app_lua/app_lua_exp.c b/modules/app_lua/app_lua_exp.c index 8716b48..856bc0d 100644 --- a/modules/app_lua/app_lua_exp.c +++ b/modules/app_lua/app_lua_exp.c @@ -1080,7 +1080,7 @@ static int lua_sr_auth_pv_authenticate(lua_State *L, int hftype) realm.len = strlen(realm.s); passwd.len = strlen(passwd.s); ret = _lua_authb.pv_authenticate(env_L->msg, &realm, &passwd, flags, - hftype); + hftype, &env_L->msg->first_line.u.request.method); return app_lua_return_int(L, ret); } @@ -1176,7 +1176,7 @@ static int lua_sr_auth_db_authenticate(lua_State *L, hdr_types_t hftype) realm.len = strlen(realm.s); table.len = strlen(table.s); ret = _lua_auth_dbb.digest_authenticate(env_L->msg, &realm, &table, - hftype); + hftype, &env_L->msg->first_line.u.request.method); return app_lua_return_int(L, ret); }
12 years
1
0
0
0
git:master: modules/auth: Added an optional parameter for method to pv_www_authenticate()
by Peter Dunkley
Module: sip-router Branch: master Commit: 3f35106f791cf0f6638128539fd147ad2f44da27 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3f35106…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com> Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com> Date: Thu Oct 25 19:43:55 2012 +0100 modules/auth: Added an optional parameter for method to pv_www_authenticate() --- modules/auth/README | 28 ++++++++------- modules/auth/api.h | 4 +- modules/auth/auth_mod.c | 71 ++++++++++++++++++++++++++++++++++++---- modules/auth/doc/functions.xml | 7 +++- 4 files changed, 87 insertions(+), 23 deletions(-) Diff:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=3f3…
12 years
1
0
0
0
git:master: Makefile.utils: add rule to create man page dir
by Daniel-Constantin Mierla
Module: sip-router Branch: master Commit: a0b36a905afda1476085a645faf29bd534ed4949 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=a0b36a9…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com> Committer: Daniel-Constantin Mierla <miconda(a)gmail.com> Date: Thu Oct 25 21:16:26 2012 +0200 Makefile.utils: add rule to create man page dir - reported by Peter Dunkley --- Makefile.utils | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile.utils b/Makefile.utils index 3198ea5..261c456 100644 --- a/Makefile.utils +++ b/Makefile.utils @@ -133,14 +133,17 @@ man: endif +$(man_prefix)/$(man_dir)/man8: + mkdir -p $(man_prefix)/$(man_dir)/man8 + .PHONY: install-util-man #src-name man page install rules ifneq (,$(wildcard $(UTIL_SRC_NAME).8)) install-util-man: $(man_prefix)/$(man_dir)/man8 - sed -e "s#$(UTIL_SRC_NAME)#$(UTIL_NAME)#g" \ + sed -e "s#$(UTIL_SRC_NAME)#$(UTIL_NAME)#g" \ -e "s#$(SRC_NAME)#$(MAIN_NAME)#g" \ < $(UTIL_SRC_NAME).8 > $(man_prefix)/$(man_dir)/man8/$(UTIL_NAME).8 - chmod 644 $(man_prefix)/$(man_dir)/man8/$(UTIL_NAME).8 + chmod 644 $(man_prefix)/$(man_dir)/man8/$(UTIL_NAME).8 else
12 years
1
0
0
0
git:master: Merge branch 'master' of ssh://git.sip-router.org/sip-router
by Peter Dunkley
Module: sip-router Branch: master Commit: 558e5294f697519917b58ddc451408b3d71aff4f URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=558e529…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com> Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com> Date: Thu Oct 25 18:22:21 2012 +0100 Merge branch 'master' of
ssh://git.sip-router.org/sip-router
* 'master' of
ssh://git.sip-router.org/sip-router
: resolve.c: make dns query only on name that has valid syntax ---
12 years
1
0
0
0
git:master: modules/msrp: Fixed a problem with relaying that I added when I put in WebSocket support
by Peter Dunkley
Module: sip-router Branch: master Commit: 0ed33c0c3332ed3868509d8ae0b035d9420a7df4 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0ed33c0…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com> Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com> Date: Thu Oct 25 18:21:41 2012 +0100 modules/msrp: Fixed a problem with relaying that I added when I put in WebSocket support --- modules/msrp/msrp_netio.c | 74 +++++++++++++++++++++++++------------------- 1 files changed, 42 insertions(+), 32 deletions(-) diff --git a/modules/msrp/msrp_netio.c b/modules/msrp/msrp_netio.c index 86e16d6..ba8e884 100644 --- a/modules/msrp/msrp_netio.c +++ b/modules/msrp/msrp_netio.c @@ -113,7 +113,8 @@ int msrp_relay(msrp_frame_t *mf) memcpy(p, fpath->name.s + 11, mf->buf.s + mf->buf.len - fpath->name.s - 11); p += mf->buf.s + mf->buf.len - fpath->name.s - 11; - + sar = (str_array_t*)tpath->parsed.data; + env = msrp_get_env(); if(env->envflags&MSRP_ENV_DSTINFO) { @@ -125,7 +126,6 @@ int msrp_relay(msrp_frame_t *mf) LM_ERR("error parsing To-Path header\n"); return -1; } - sar = (str_array_t*)tpath->parsed.data; if(sar==NULL || sar->size<2) { LM_DBG("To-Path has no next hop URI -- nowehere to forward\n"); @@ -138,41 +138,51 @@ int msrp_relay(msrp_frame_t *mf) } dst = &env->dstinfo; done: - port = su_getport(&dst->to); - if (likely(port)) + if (sar->size == 2) { - ticks_t con_lifetime; - struct ip_addr ip; + /* If the next hop is a client a connection must already + exist... */ + port = su_getport(&dst->to); + if (likely(port)) + { + ticks_t con_lifetime; + struct ip_addr ip; - con_lifetime = cfg_get(tcp, tcp_cfg, con_lifetime); - su2ip_addr(&ip, &dst->to); - con = tcpconn_get(dst->id, &ip, port, NULL, con_lifetime); - } - else if (likely(dst->id)) - { - con = tcpconn_get(dst->id, 0, 0, 0, 0); - } + con_lifetime = cfg_get(tcp, tcp_cfg, con_lifetime); + su2ip_addr(&ip, &dst->to); + con = tcpconn_get(dst->id, &ip, port, NULL, con_lifetime); + } + else if (likely(dst->id)) + { + con = tcpconn_get(dst->id, 0, 0, 0, 0); + } - if (con == NULL) - { - LM_WARN("TCP/TLS connection not found\n"); - return -1; - } + if (con == NULL) + { + LM_WARN("TCP/TLS connection not found\n"); + return -1; + } - if (unlikely((con->rcv.proto == PROTO_WS || con->rcv.proto == PROTO_WSS) - && sr_event_enabled(SREV_TCP_WS_FRAME_OUT))) { - ws_event_info_t wsev; - - memset(&wsev, 0, sizeof(ws_event_info_t)); - wsev.type = SREV_TCP_WS_FRAME_OUT; - wsev.buf = reqbuf; - wsev.len = p - reqbuf; - wsev.id = con->id; - return sr_event_exec(SREV_TCP_WS_FRAME_OUT, (void *) &wsev); + if (unlikely((con->rcv.proto == PROTO_WS || con->rcv.proto == PROTO_WSS) + && sr_event_enabled(SREV_TCP_WS_FRAME_OUT))) { + ws_event_info_t wsev; + + memset(&wsev, 0, sizeof(ws_event_info_t)); + wsev.type = SREV_TCP_WS_FRAME_OUT; + wsev.buf = reqbuf; + wsev.len = p - reqbuf; + wsev.id = con->id; + return sr_event_exec(SREV_TCP_WS_FRAME_OUT, (void *) &wsev); + } + else if (tcp_send(dst, 0, reqbuf, p - reqbuf) < 0) { + LM_ERR("forwarding frame failed\n"); + return -1; + } } + /* If the next hop is a relay just throw it out there... */ else if (tcp_send(dst, 0, reqbuf, p - reqbuf) < 0) { - LM_ERR("forwarding frame failed\n"); - return -1; + LM_ERR("forwarding frame failed\n"); + return -1; } return 0;
12 years
1
0
0
0
git:master: resolve.c: make dns query only on name that has valid syntax
by admin@sip-router.org
Module: sip-router Branch: master Commit: 019ab5e2d6730b764b20a890f9a3b5f9237b6338 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=019ab5e…
Author: Juha Heinanen <jh(a)tutpro.com> Committer: Juha Heinanen <jh(a)tutpro.com> Date: Thu Oct 25 19:50:17 2012 +0300 resolve.c: make dns query only on name that has valid syntax --- resolve.c | 16 ++++++++++++++-- 1 files changed, 14 insertions(+), 2 deletions(-) diff --git a/resolve.c b/resolve.c index 36a2992..faabb96 100644 --- a/resolve.c +++ b/resolve.c @@ -694,7 +694,7 @@ struct rdata* get_record(char* name, int type, int flags) int size; int skip; int qno, answers_no; - int r; + int i, r; static union dns_query buff; unsigned char* p; unsigned char* end; @@ -712,17 +712,29 @@ struct rdata* get_record(char* name, int type, int flags) int search_list_used; int name_len; struct rdata* fullname_rd; + char c; #ifdef USE_DNSSEC val_status_t val_status; #endif + name_len=strlen(name); + + for (i = 0; i < name_len; i++) { + c = name[i]; + if (((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) || + ((c >= '0') && (c <= '9')) || (name[i] == '.') || + (name[i] == '-') || (name[i] == '_')) + continue; + LM_INFO("invalid domain name '%s'\n", name); + return 0; + } + if (cfg_get(core, core_cfg, dns_search_list)==0) { search_list_used=0; name_len=0; } else { search_list_used=1; - name_len=strlen(name); } fullname_rd=0;
12 years
3
2
0
0
git:master: modules_k/xcap_server: Added support for the org. openmobilealliance.xcap-directory auid
by Peter Dunkley
Module: sip-router Branch: master Commit: 4d48c5d485c9c1155b8b7471fbda56a80a218d48 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4d48c5d…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com> Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com> Date: Thu Oct 25 17:33:46 2012 +0100 modules_k/xcap_server: Added support for the org.openmobilealliance.xcap-directory auid - Directory listing worked out on-the-fly based on DB contents --- modules_k/xcap_server/xcap_misc.c | 34 +-- modules_k/xcap_server/xcap_misc.h | 8 + modules_k/xcap_server/xcap_server.c | 584 +++++++++++++++++++++++------------ 3 files changed, 413 insertions(+), 213 deletions(-) Diff:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=4d4…
12 years
2
1
0
0
git:master: modules_k/xcap_server: Updated example event_route[] in README
by Peter Dunkley
Module: sip-router Branch: master Commit: aebeeee1993e4cce0d3288f1ccd8d17f3efee925 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=aebeeee…
Author: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com> Committer: Peter Dunkley <peter.dunkley(a)crocodile-rcs.com> Date: Thu Oct 25 17:34:39 2012 +0100 modules_k/xcap_server: Updated example event_route[] in README - Now includes: - updating of RLS subscriptions when RLS documents change - pidf-manipulation - clean handling of org.openmobilealliance.search - org.openmobilealliance.xcap-directory support --- modules_k/xcap_server/README | 63 +++++++++++++++++++- modules_k/xcap_server/doc/xcap_server_admin.xml | 69 ++++++++++++++++++++--- 2 files changed, 119 insertions(+), 13 deletions(-) diff --git a/modules_k/xcap_server/README b/modules_k/xcap_server/README index 81f931f..662d3e5 100644 --- a/modules_k/xcap_server/README +++ b/modules_k/xcap_server/README @@ -310,9 +310,11 @@ event_route[xhttp:request] { $var(uri) = "sip:"+ $xcapuri(u=>xuid) + "@" + $Ri; # handle XCAP capability request - if($rm=="GET" && $xcapuri(u=>auid)=="xcap-caps") + if($xcapuri(u=>auid)=="xcap-caps") { - $var(xbody) = + if ($rm == "GET") + { + $var(xbody) = "<?xml version='1.0' encoding='UTF-8'?> <xcap-caps xmlns='urn:ietf:params:xml:ns:xcap-caps'> <auids> @@ -322,6 +324,10 @@ event_route[xhttp:request] { <auid>resource-lists</auid> <auid>pres-rules</auid> <auid>org.openmobilealliance.pres-rules</auid> + <auid>org.openmobilealliance.user-profile</auid> + <auid>org.openmobilealliance.pres-content</auid> + <auid>org.openmobilealliance.search</auid> + <auid>org.openmobilealliance.xcap-directory</auid> </auids> <extensions> </extensions> @@ -331,10 +337,20 @@ event_route[xhttp:request] { <namespace>urn:ietf:params:xml:ns:xcap-caps</namespace> <namespace>urn:ietf:params:xml:ns:resource-lists</namespace> <namespace>urn:ietf:params:xml:ns:pres-rules</namespace> + <namespace>urn:oma:xml:xdm:user-profile</namespace> + <namespace>urn:oma:xml:prs:pres-content</namespace> + <namespace>urn:oma:xml:xdm:search</namespace> + <namespace>urn:oma:xml:xdm:xcap-directory</namespace> </namespaces> </xcap-caps>"; - xhttp_reply("200", "ok", "application/xcap-caps+xml", - "$var(xbody)"); + xhttp_reply("200", "ok", "application/xcap-caps+xml", + "$var(xbody)"); + } + else + { + append_to_reply("Allow: GET\r\n"); + xhttp_reply("405", "Method Not Allowed", "", ""); + } exit; } # be sure auth user access only its documents @@ -353,6 +369,16 @@ event_route[xhttp:request] { pres_update_watchers("$var(uri)", "presence"); pres_refresh_watchers("$var(uri)", "presence", 1); } + else if($xcapuri(u=>auid)=~"rls-services" || $xcapuri(u=>auid)=~ +"resource-lists") + { + rls_update_subs("$var(uri)", "presence"); + } + else if($xcapuri(u=>auid)=~"pidf-manipulation") + { + pres_refresh_watchers("$var(uri)", "presence", 2, "$xcapuri( +u=>uri_adoc)", "$xcapuri(u=>file)"); + } exit; break; case "GET": @@ -366,6 +392,35 @@ event_route[xhttp:request] { pres_update_watchers("$var(uri)", "presence"); pres_refresh_watchers("$var(uri)", "presence", 1); } + else if($xcapuri(u=>auid)=~"rls-services" || $xcapuri(u=>auid)=~ +"resource-lists") + { + rls_update_subs("$var(uri)", "presence"); + } + else if($xcapuri(u=>auid)=~"pidf-manipulation") + { + pres_refresh_watchers("$var(uri)", "presence", 2, "$xcapuri( +u=>uri_adoc)", "$xcapuri(u=>file)"); + } + exit; + break; + case "POST": + if($xcapuri(u=>auid)=~"search") + { + xhttp_reply("501", "Not Implemented", "", ""); + } + else + { + if($xcapuri(u=>auid)=~"xcap-directory") + { + append_to_reply("Allow: GET\r\n"); + } + else + { + append_to_reply("Allow: DELETE, GET, PUT\r\n"); + } + xhttp_reply("405", "Method Not Allowed", "", ""); + } exit; break; } diff --git a/modules_k/xcap_server/doc/xcap_server_admin.xml b/modules_k/xcap_server/doc/xcap_server_admin.xml index b0b4e8b..3196972 100644 --- a/modules_k/xcap_server/doc/xcap_server_admin.xml +++ b/modules_k/xcap_server/doc/xcap_server_admin.xml @@ -361,9 +361,11 @@ event_route[xhttp:request] { $var(uri) = "sip:"+ $xcapuri(u=>xuid) + "@" + $Ri; # handle XCAP capability request - if($rm=="GET" && $xcapuri(u=>auid)=="xcap-caps") + if($xcapuri(u=>auid)=="xcap-caps") { - $var(xbody) = + if ($rm == "GET") + { + $var(xbody) = "<?xml version='1.0' encoding='UTF-8'?> <xcap-caps xmlns='urn:ietf:params:xml:ns:xcap-caps'> <auids> @@ -373,19 +375,33 @@ event_route[xhttp:request] { <auid>resource-lists</auid> <auid>pres-rules</auid> <auid>org.openmobilealliance.pres-rules</auid> + <auid>org.openmobilealliance.user-profile</auid> + <auid>org.openmobilealliance.pres-content</auid> + <auid>org.openmobilealliance.search</auid> + <auid>org.openmobilealliance.xcap-directory</auid> </auids> <extensions> </extensions> <namespaces> - <namespace>urn:ietf:params:xml:ns:rls-services</namespace> - <namespace>urn:ietf:params:xml:ns:pidf</namespace> - <namespace>urn:ietf:params:xml:ns:xcap-caps</namespace> - <namespace>urn:ietf:params:xml:ns:resource-lists</namespace> - <namespace>urn:ietf:params:xml:ns:pres-rules</namespace> + <namespace>urn:ietf:params:xml:ns:rls-services</namespace> + <namespace>urn:ietf:params:xml:ns:pidf</namespace> + <namespace>urn:ietf:params:xml:ns:xcap-caps</namespace> + <namespace>urn:ietf:params:xml:ns:resource-lists</namespace> + <namespace>urn:ietf:params:xml:ns:pres-rules</namespace> + <namespace>urn:oma:xml:xdm:user-profile</namespace> + <namespace>urn:oma:xml:prs:pres-content</namespace> + <namespace>urn:oma:xml:xdm:search</namespace> + <namespace>urn:oma:xml:xdm:xcap-directory</namespace> </namespaces> </xcap-caps>"; - xhttp_reply("200", "ok", "application/xcap-caps+xml", - "$var(xbody)"); + xhttp_reply("200", "ok", "application/xcap-caps+xml", + "$var(xbody)"); + } + else + { + append_to_reply("Allow: GET\r\n"); + xhttp_reply("405", "Method Not Allowed", "", ""); + } exit; } # be sure auth user access only its documents @@ -404,6 +420,14 @@ event_route[xhttp:request] { pres_update_watchers("$var(uri)", "presence"); pres_refresh_watchers("$var(uri)", "presence", 1); } + else if($xcapuri(u=>auid)=~"rls-services" || $xcapuri(u=>auid)=~"resource-lists") + { + rls_update_subs("$var(uri)", "presence"); + } + else if($xcapuri(u=>auid)=~"pidf-manipulation") + { + pres_refresh_watchers("$var(uri)", "presence", 2, "$xcapuri(u=>uri_adoc)", "$xcapuri(u=>file)"); + } exit; break; case "GET": @@ -417,6 +441,33 @@ event_route[xhttp:request] { pres_update_watchers("$var(uri)", "presence"); pres_refresh_watchers("$var(uri)", "presence", 1); } + else if($xcapuri(u=>auid)=~"rls-services" || $xcapuri(u=>auid)=~"resource-lists") + { + rls_update_subs("$var(uri)", "presence"); + } + else if($xcapuri(u=>auid)=~"pidf-manipulation") + { + pres_refresh_watchers("$var(uri)", "presence", 2, "$xcapuri(u=>uri_adoc)", "$xcapuri(u=>file)"); + } + exit; + break; + case "POST": + if($xcapuri(u=>auid)=~"search") + { + xhttp_reply("501", "Not Implemented", "", ""); + } + else + { + if($xcapuri(u=>auid)=~"xcap-directory") + { + append_to_reply("Allow: GET\r\n"); + } + else + { + append_to_reply("Allow: DELETE, GET, PUT\r\n"); + } + xhttp_reply("405", "Method Not Allowed", "", ""); + } exit; break; }
12 years
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
25
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Results per page:
10
25
50
100
200