[Kamailio-Devel] new http_query function

Klaus Darilion klaus.mailinglists at pernau.at
Mon Nov 10 10:16:24 CET 2008



Juha Heinanen schrieb:
> 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.

Are the params sent as GET or POST?

What about making it more generic? Send a request, get a result. Then in 
  script you can decide if the result will be used e.g. as RURI or RPID 
or ...

What about renaming cfgutils to utils and adding it there?

Is libcurl reentrant? It will be also loaded (initialized ...) by 
xcap_client.


regards
klaus

> 
> 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
> 
> _______________________________________________
> Devel mailing list
> Devel at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/devel



More information about the Devel mailing list