Show More
@@ -8,7 +8,7 b'' | |||
|
8 | 8 | |
|
9 | 9 | from mercurial.demandload import demandload |
|
10 | 10 | import os, sys, errno |
|
11 | demandload(globals(), "urllib BaseHTTPServer socket SocketServer") | |
|
11 | demandload(globals(), "urllib BaseHTTPServer socket SocketServer traceback") | |
|
12 | 12 | demandload(globals(), "mercurial:ui,hg,util,templater") |
|
13 | 13 | demandload(globals(), "hgweb_mod:hgweb hgwebdir_mod:hgwebdir request:wsgiapplication") |
|
14 | 14 | from mercurial.i18n import gettext as _ |
@@ -55,10 +55,17 b' class _hgwebhandler(object, BaseHTTPServ' | |||
|
55 | 55 | |
|
56 | 56 | def do_POST(self): |
|
57 | 57 | try: |
|
58 | self.do_hgweb() | |
|
59 | except socket.error, inst: | |
|
60 | if inst[0] != errno.EPIPE: | |
|
61 | raise | |
|
58 | try: | |
|
59 | self.do_hgweb() | |
|
60 | except socket.error, inst: | |
|
61 | if inst[0] != errno.EPIPE: | |
|
62 | raise | |
|
63 | except StandardError, inst: | |
|
64 | self._start_response("500 Internal Server Error", []) | |
|
65 | self._write("Internal Server Error") | |
|
66 | tb = "".join(traceback.format_exception(*sys.exc_info())) | |
|
67 | self.log_error("Exception happened during processing request '%s':\n%s", | |
|
68 | self.path, tb) | |
|
62 | 69 | |
|
63 | 70 | def do_GET(self): |
|
64 | 71 | self.do_POST() |
General Comments 0
You need to be logged in to leave comments.
Login now