diff --git a/index.cgi b/index.cgi index e7a1d576617..301f395d44d 100755 --- a/index.cgi +++ b/index.cgi @@ -38,10 +38,25 @@ def init(): # init request try: webnotes.http_request = webnotes.auth.HTTPRequest() + return True except webnotes.AuthenticationError, e: pass except webnotes.UnknownDomainError, e: print "Location: " + (webnotes.defs.redirect_404) + except webnotes.SessionStopped, e: + if 'cmd' in webnotes.form_dict: + webnotes.handler.print_json() + else: + print "Content-Type: text/html" + print + print """ +
+