[Kamailio-Devel] new http_query function

Juha Heinanen jh at tutpro.com
Sun Nov 9 12:49:17 CET 2008


i wrote a function

http_query(page, params)

that sends http get to given page with given params and gets as body of
reply an uri if result code is 2xx or 3xx.  it then uses this uri to
replace current request uri.  in practise http_query thus allows a web
server to rewrite request uri based on given parameters.

i have two problems with this function:

1) i don't know, which module to place it.  

   any suggestions?

2) i would need to add '+' char to escape.param transformation, because
even when '+' is an allowed char in uri parameter, it is commonly used
in http uris to denote ' ' char.  thus if '+' is passed unescaped in a
parameter, web server application gets it as ' ' instead.

   would this be ok to do?

-- juha



More information about the Devel mailing list