Skip to content

Commit

Permalink
remove the error log
Browse files Browse the repository at this point in the history
  • Loading branch information
xxnet committed Dec 15, 2015
1 parent 0ba5cb7 commit b41506d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions python27/1.0/lib/noarch/simple_http_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,12 @@ def send_not_found(self):

def send_response(self, mimetype, data):
no_cache = "Cache-Control: no-cache, no-store, must-revalidate\r\nPragma: no-cache\r\nExpires: 0\r\n"
self.wfile.write(('HTTP/1.1 200\r\n%sAccess-Control-Allow-Origin: *\r\nContent-Type: %s\r\nContent-Length: %s\r\n\r\n'
% (no_cache, mimetype, len(data))).encode())
self.wfile.write(data)
try:
self.wfile.write(('HTTP/1.1 200\r\n%sAccess-Control-Allow-Origin: *\r\nContent-Type: %s\r\nContent-Length: %s\r\n\r\n'
% (no_cache, mimetype, len(data))).encode())
self.wfile.write(data)
except:
pass

def send_error(self, code, message=None):
self.wfile.write('HTTP/1.1 %d\r\n' % code)
Expand Down

0 comments on commit b41506d

Please sign in to comment.