Commits

Anonymous committed a7b2a79

Fixed small bug in nsgmlsfilter

Comments (0)

Files changed (2)

cherrypy/lib/filter/nsgmlsfilter.py

             command = '%s -c%s -f%s -s -E10 %s' % (
                 nsgmlsPath, catalogPath, errFile, pageFile)
             command = command.replace('\\', '/')
-            #command = '"%s" -f%s -s -E10 %s' % (
-            #    nsgmlsPath, errFile, pageFile)
-            print "** comand:", command
             os.system(command)
             f = open(errFile, 'rb')
             err = f.read()
             f.close()
-            
             errList = err.splitlines()
             newErrList = []
-            for err in newErrList:
+            for err in errList:
                 if err.find('characters in the document character set with numbers exceeding 65535 not supported') != -1:
                     continue
                 newErrList.append(err)

cherrypy/lib/filter/sessionauthenticatefilter.py

         elif cpg.request.path.endswith('doLogout'):
             cpg.request.sessionMap['username'] = None
             cpg.threadData.user = None
-            cpg.response.body = httptools.redirect('/')
+            fromPage = cpg.request.paramMap.get('fromPage')
+            if fromPage is None:
+                fromPage = '/'
+            cpg.response.body = httptools.redirect(fromPage)
         elif cpg.request.path.endswith('doLogin'):
             fromPage = cpg.request.paramMap['fromPage']
             login = cpg.request.paramMap['login']
                 cpg.response.body = self.loginScreen(fromPage, login = login, errorMsg = errorMsg)
             else:
                 cpg.request.sessionMap['username'] = login
+                if not fromPage:
+                    fromPage = '/'
                 cpg.response.body = httptools.redirect(fromPage)
             return
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.