## Template for submitting bug reports ## Note: All bugs pagename should be: MoinMoinBugs/BugName ## Note: Don't forget you can improve this bug template - edit the page called BugTemplate. = Description = Errors or exceptions occur on every page served by the standalone server in 1.3beta4. I'm using it on Windows, viewing pages using Mozilla Firefox. == Example == Initial traceback: [[attachment:moin.log.txt]] After adding {{{import traceback traceback.print_exc()}}} to request.py at lydon's request: attachment:moin.log2.txt After switching to HTTP/1.0 requests: [[attachment:moin.log3.txt]] == Details == This Wiki. == Workaround == I intially believed it to be be an issue with how the connection was closed. All the files and pages seemed to serve up fine, so I thought it could be ignored, but it did cause constant scrolling of the console and filled up the log. = Discussion = lydon on IRC pointed out that it happened after every favicon.ico request, and suggested that the standalone server wouldn't serve that as a file because it's not under /wiki/. This turned out to be correct. I changed the do_GET() function in standalone.py (starting at line 95) to add the following check between the initial wiki path check and the else: {{{#!python elif self.path == ('/favicon.ico'): self.expires = 7*24*3600 # 1 week expiry for png, css SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)}}} This did indeed solve the problem. No, it just changed the surface of the problem. This is the true fix: {{{#!python --- request.py.orig Sat Nov 06 19:41:14 2004 +++ request.py Tue Nov 09 00:17:07 2004 @@ -1475,7 +1475,12 @@ def write(self, *data): """ Write to output stream. """ - self.wfile.write(self.encode(data)) + from socket import error as SocketError + try: + self.wfile.write(self.encode(data)) + except SocketError, ex: + if ex.args[0] != 10053: # Software caused connection abort + raise def flush(self): self.wfile.flush() }}} Fixed by running standalone do_GET in try: except, catch both "Broken pipe" and "Software caused abort" errors reported here. Tested on Mac OS X. Please get patch-257 and test on Windows. = Plan = ## This part is for Moin``Moin developers: * Priority: * Assigned to: * Status: Fixed in patch-257 ---- ## When the bug is fixed, replace the category to Category MoinMoinBugFixed ## If this is not a bug, replace with Category MoinMoinNoBug CategoryMoinMoinBugFixed