Revision be26c4f22f52f4c488d8e9d586db50eea2428a10 authored by Jim Evans on 15 March 2018, 21:21:56 UTC, committed by Jim Evans on 15 March 2018, 21:21:56 UTC
For the domain attribute of a returned cookie, if the attribute value
conatains a domain with a single dot ('.'), some user agents prepend a
leading dot onto the beginning of the attribute value. This is consistent
with RFC 2965. Some user agents expressly omit the leading dot, which is
consistent with the later RFC 6265. This commit allows both values as the
returned value of the domain attribute.
1 parent 750cfaf
Raw File
beacon-redirect.window.js
// META: script=/common/utils.js
// META: script=beacon-common.sub.js

"use strict";

// Execute each sample test per redirect status code.
// Note that status codes 307 and 308 are the only codes that will maintain POST data
// through a redirect.
[307, 308].forEach(function(status) {
    // Implement the self.buildId extension to identify the parameterized
    // test in the report.
    self.buildId = function(baseId) {
        return `${baseId}-${status}`;
    };

    // Implement the self.buildTargetUrl extension to inject a redirect to
    // the sendBeacon target.
    self.buildTargetUrl = function(targetUrl) {
        return `/common/redirect.py?status=${status}&location=${encodeURIComponent(targetUrl)}`;
    };

    runTests(sampleTests);
});

done();
back to top