diff --git a/VERSION b/VERSION index 8069a0f8..320186f1 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-08-08 10:23:01) dev +Version 2.00.0 (2012-08-08 12:17:50) dev diff --git a/gluon/http.py b/gluon/http.py index df175175..07512b54 100644 --- a/gluon/http.py +++ b/gluon/http.py @@ -119,9 +119,10 @@ class HTTP(BaseException): return self.message -def redirect(location, how=303, type=None): - from gluon import current - type = type or ('client' if current.request.ajax else 'http') +def redirect(location, how=303, type='http'): + if type=='auto': + from gluon import current + type = 'client' if current.request.ajax else 'http' if not location: return location = location.replace('\r', '%0D').replace('\n', '%0A')