Skip to content

Commit

Permalink
Pass js_meta_re when using read_script_metadata with .any and .worker…
Browse files Browse the repository at this point in the history
… files (#179)
  • Loading branch information
jgraham authored and gsnedders committed Mar 6, 2017
1 parent 1d4d161 commit c1cd413
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions serve/serve.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from ..localpaths import repo_root

import sslutils
from manifest.sourcefile import read_script_metadata
from manifest.sourcefile import read_script_metadata, js_meta_re
from wptserve import server as wptserve, handlers
from wptserve import stash
from wptserve.logger import set_logger
Expand Down Expand Up @@ -63,7 +63,7 @@ def _get_meta(self, request):
path = path.replace(".any.worker.html", ".any.js")
path = path.replace(".worker.html", ".worker.js")
with open(path, "rb") as f:
for key, value in read_script_metadata(f):
for key, value in read_script_metadata(f, js_meta_re):
if key == b"timeout":
if value == b"long":
yield '<meta name="timeout" content="long">'
Expand Down Expand Up @@ -101,7 +101,7 @@ def _get_meta(self, request):
path = filesystem_path(self.base_path, request, self.url_base)
path = path.replace(".any.html", ".any.js")
with open(path, "rb") as f:
for key, value in read_script_metadata(f):
for key, value in read_script_metadata(f, js_meta_re):
if key == b"timeout":
if value == b"long":
yield '<meta name="timeout" content="long">'
Expand Down Expand Up @@ -137,7 +137,7 @@ def _get_meta(self, request):
path = filesystem_path(self.base_path, request, self.url_base)
path = path.replace(".any.worker.js", ".any.js")
with open(path, "rb") as f:
for key, value in read_script_metadata(f):
for key, value in read_script_metadata(f, js_meta_re):
if key == b"timeout":
pass
elif key == b"script":
Expand Down

0 comments on commit c1cd413

Please sign in to comment.