durusmail: quixote-users: scgi vs apache redirection to localhost
scgi vs apache redirection to localhost
2004-09-23
2004-09-23
2004-09-23
scgi vs apache redirection to localhost
Karl N. Redman
2004-09-23
Neil,
That did the trick.

HTTPRequest.get_server() does a self.environ.get("HTTP_HOST") to grab the
hostname. rather than override this though I'm just building the absolute URL
from scratch:

ADDR = request.get_environ('SERVER_ADDR')+
request.get_environ('SCRIPT_NAME')+'/'

and then pulling 'top-level' urls out of a dictionary (actually from an RDF
triplestore) as such:

        for key in url_dict1.keys():
            ''
            key
            ''
            '
' That explained allot of things. Thank you very much, Karl N. Redman Neil Schemenauer wrote: >On Thu, Sep 23, 2004 at 10:42:20AM -0500, Karl N. Redman wrote: > > >>a link that looks like >>yields a page served up as http://localhost/foo/blecch/ >> >> > >Quixote needs to build an absolute URL when doing the redirect. I >suspect it is getting the hostname wrong. You could try adding: > > print 'server', request.get_server() > >somewhere in your code. I'm guessing that it will print >'localhost'. You can look at HTTPRequest.get_server() to see how >Quixote determines the server name. > > Neil > >
reply