Hi

I'm using apache2 + mod-webkit (from 0.9.1) and webware 0.9.2 (and 0.9.3)
My website can have multiple names: http://example.com/ or
http://www.example.com (like many websites) and also https://...
I've just found out that request().serverURL() does not return the real
PATH of the request.
It replaces the http host with the server name configured in apache.
Is this the intended behaviour?
I can't use this, because the session is lost when returning to another url.

As I need an absolute return url (for payments for example), I've made a
custom requestURL() method:

    def isSecure(self):
        return self.request().serverDictionary().get('HTTPS',None) == 'on'

    def requestURL(self):
        req=self.request()
        if self.isSecure():
            url='https://'
        else:
            url='http://'
        url+=req.serverDictionary()['HTTP_HOST']+req.serverPath()
        return url



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to