Re: Getting rewritten and encoded/escaped url in nginx module

2014-06-04 Thread Maxim Dounin
Hello! On Tue, Jun 03, 2014 at 02:08:36PM -0700, Jayadev C wrote: > The problem is ngx_http_proxy doesn't do that either, once > rewrite is applied the url remains decoded (or I am not reading > the code correctly). The proxy does ngx_escape_uri() if URI was rewritten. It has to, as unencode

Re: Getting rewritten and encoded/escaped url in nginx module

2014-06-03 Thread Jayadev C
The problem is ngx_http_proxy doesn't do that either, once rewrite is applied the url remains decoded (or I am not reading the code correctly).  In fact escaping uri back is a bit tricky since you have to split the rewritten url to segments and apply encoding again (which would require looking

Re: Getting rewritten and encoded/escaped url in nginx module

2014-06-03 Thread Maxim Dounin
Hello! On Tue, Jun 03, 2014 at 09:42:41AM -0700, Jayadev C wrote: > > > Hi, > > > I am writing a nginx proxy module and want to grab the url which > is urlencoded (as the client sends it) and also after rewrite > rules are applied.  My typical url looks like : > path1/path2/path3/urlencod

Re: Getting rewritten and encoded/escaped url in nginx module

2014-06-03 Thread B.R.
I am not providing a direct answer but could not you use some standard modules to do that? Such as using (examples): - rewrite associated with a map, loaded from a separate configuration file reloaded after changes - the perl module to invo

Getting rewritten and encoded/escaped url in nginx module

2014-06-03 Thread Jayadev C
Hi, I am writing a nginx proxy module and want to grab the url which is urlencoded (as the client sends it) and also after rewrite rules are applied.  My typical url looks like : path1/path2/path3/urlencoded(key)?args, after rewriting the url I would love to have is something like : newpat