Skip to content
Browse files
Fix serve (don’t bother with f.tell)
cc @Aeyoun

Signed-off-by: Chris Warrick <>
  • Loading branch information
Kwpolska committed Aug 6, 2015
1 parent dc4cedd commit 29c2fae5293ae508139aeed15dacf963a4052301
Showing 1 changed file with 2 additions and 2 deletions.
@@ -231,15 +231,15 @@ def send_head(self):

filtered_bytes = None
if ctype == 'text/html':
"""Comment out any <base> to allow local resolution of relative URLs."""
# Comment out any <base> to allow local resolution of relative URLs.
data ='utf8')
data = re.sub(r'<base\s([^>]*)>', '<!--base \g<1>-->', data, re.IGNORECASE)
data = data.encode('utf8')
f = StringIO()
filtered_bytes = len(data)
filtered_bytes = f.tell()

self.send_header("Content-type", ctype)

0 comments on commit 29c2fae

Please sign in to comment.