Skip to content

Commit

Permalink
remove debug log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
joknarf committed Dec 3, 2024
1 parent bea4cff commit 9d37384
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pywebfs/pywebfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ def find_files(self, search, path):
for s in search.split():
try:
rexp.append(re.compile(accent_re(s), re.IGNORECASE))
self.log_message(accent_re(s))
except:
err = 1
if err:
Expand Down Expand Up @@ -216,12 +215,9 @@ def list_directory(self, path):

def end_headers(self):
is_file = "?" not in self.path and not self.path.endswith("/")
# is_file = False
# This part adds extra headers for some file types.
self.log_message(str(is_file))
# adds extra headers for some file types.
if is_file:
mimetype = self.guess_type(self.path)
self.log_message(mimetype)
if mimetype in ["text/plain"]:
self.send_header("Content-Type", "text/plain")
self.send_header("Content-Disposition", "inline")
Expand Down Expand Up @@ -249,7 +245,6 @@ def do_GET(self):
displaypath = urllib.parse.unquote(p.path)
path = displaypath
displaypath = html.escape(displaypath, quote=False)
self.log_message(path)
title = f"{self.server.title} - {displaypath}"
htmldoc = HTML
htmldoc += f"<title>{title}</title>\n</head>"
Expand Down

0 comments on commit 9d37384

Please sign in to comment.