Re: [BangPypers] How to retrieve current URL in CGI scripting

2009-11-26 Thread Vivek Khurana
On Thu, Nov 26, 2009 at 7:45 PM, Vivek Rajendran wrote: > > Hi, >    A doubt again... >    I have looked into apache.py file inside > /usr/lib/python2.3/site-packages/... path and they have a method > build_cgi_env(req) > >    If we invoke this function it gives a dict of env variables. >    But I

Re: [BangPypers] How to retrieve current URL in CGI scripting

2009-11-26 Thread Vivek Rajendran
Hi, A doubt again... I have looked into apache.py file inside /usr/lib/python2.3/site-packages/... path and they have a method build_cgi_env(req) If we invoke this function it gives a dict of env variables. But I don't know how to invoke this function ? with that 'req' argument

Re: [BangPypers] How to retrieve current URL in CGI scripting

2009-11-24 Thread Praveen Kumar
You can try HTTP_REFERER but it depends on several things (browser, server, cgi-implementation etc.) On Tue, Nov 24, 2009 at 12:13 PM, Vivek Khurana wrote: > On Tue, Nov 24, 2009 at 10:09 AM, Vivek Rajendran > wrote: > > > > Hi, > > I would like to know how to get the current url inside the

Re: [BangPypers] How to retrieve current URL in CGI scripting

2009-11-23 Thread Vivek Khurana
On Tue, Nov 24, 2009 at 10:09 AM, Vivek Rajendran wrote: > > Hi, >     I would like to know how to get the current url inside the cgi script > where I'm using it. > For Ex: >     I'm having index.py in location /var/www/html/foobar/ in server with IP > 10.0.0.12 > >     When I retrive this page fr

[BangPypers] How to retrieve current URL in CGI scripting

2009-11-23 Thread Vivek Rajendran
Hi, I would like to know how to get the current url inside the cgi script where I'm using it. For Ex: I'm having index.py in location /var/www/html/foobar/ in server with IP 10.0.0.12 When I retrive this page from browser, I want to know the current URL as "http://10.0.0.12/foobar/