Skip to content

Instantly share code, notes, and snippets.

View ianb's full-sized avatar

Ian Bicking ianb

View GitHub Profile
import decorator
def multiplier(n):
def decorator(fn):
return Multiplier(fn, n)
return decorator
class Multiplier(object):
def __init__(self, func, n):
self.func = func
The origin should be an ASCII URL, that is, non-ASCII characters
should be normalized down to ASCII.
We are relying on urlmatch.js's normalization of :80 etc, not testing
that directly (because it makes the tests hard to run). We should
verify that all URLs are being normalized in all code paths.
Widgets are allowed in the code but not noted in the spec, need to be
readded. Takes a path and a preferred size, like {"widget": {"path":
"/widget.html", "width": 100, "height": 100}}. Height and width are
The origin should be an ASCII URL, that is, non-ASCII characters
should be normalized down to ASCII.
LH: The UA should handle idna for us. I think this is a noop.
IB: Hmm... yeah, now that I think about it. It could be a little assert sometime if we want,
just to make sure the UA is not weird. We don't care about non-ASCII anywhere but the
origin, and the origin isn't in the manifest, so we're okay.
We are relying on urlmatch.js's normalization of :80 etc, not testing