Hi Steven,
Thanks but I don't seem to have the 'wsgi.url_scheme' available in my
request.META could it be becuase I'm using apache and mod_python?
On 5/5/06, Steven Armstrong <[EMAIL PROTECTED]> wrote:
>
> On 05/05/06 19:33, Jakub Labath wrote:
> > Hi,
> >
> > I eventually solved my problem by modifying
> > django/core/handlers/modpython.py
> > so that request.META would contain a key HTTPS.
> >
> > --- core/handlers/modpython.py (revision 2299)
> > +++ core/handlers/modpython.py (working copy)
> > @@ -86,6 +86,8 @@
> > for key, value in self._req.headers_in.items():
> > key = 'HTTP_' + key.upper().replace('-', '_')
> > self._meta[key] = value
> > + if hasattr(self._req.subprocess_env,'HTTPS'):
> > + self._meta['HTTPS'] = self._req.subprocess_env['HTTPS']
> > return self._meta
> >
> > def _get_raw_post_data(self):
> >
> >
> > Is this a good/bad idea? Any thoughts? Let me know if you guys find it
> > useful I can add a patch to trac.
> >
> > Best Regards
>
> Hi Jakub
>
> I believe you can use something like:
>
> if request.META['wsgi.url_scheme'] == 'https':
> secure stuff
> else:
> non-secure stuff
>
>
> hth
> Steven
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---