if req_num % 2: # odd requests are the first in a test pair if inm: # what are you doing here? This should be a fresh request. return error(u"If-None-Match on first request") else:
status = 200, b"OK"
headers.append((b"Access-Control-Allow-Origin", b"*"))
headers.append((b"Content-Type", b"text/plain"))
headers.append((b"Cache-Control", b"private, max-age=3, must-revalidate"))
headers.append((b"ETag", etag)) return status, headers, b"Success" else: # even requests are the second in a pair, and should have a good INM. if inm != etag: # Bad browser. if inm == None: return error(u"If-None-Match missing") else: return error(u"If-None-Match '%s' mismatches") else: if req_num == 2: pass# basic, vanilla check elif req_num == 4:
headers.append((b"Access-Control-Expose-Headers", b"a, b")) elif req_num == 6:
headers.append((b"Access-Control-Expose-Headers", b"a")) elif req_num == 8:
headers.append((b"Access-Control-Allow-Origin", b"other.origin.example:80"))
status = 304, b"Not Modified" return status, headers, b""
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.