mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
600d2857cc
Backed out changeset 254c1ac4ab8b (bug 842657) Backed out changeset 58a2011beeac (bug 763879)
27 lines
635 B
JavaScript
27 lines
635 B
JavaScript
// SJS file for CSP mochitests
|
|
|
|
function handleRequest(request, response)
|
|
{
|
|
var query = {};
|
|
request.queryString.split('&').forEach(function (val) {
|
|
var [name, value] = val.split('=');
|
|
query[name] = unescape(value);
|
|
});
|
|
|
|
var isPreflight = request.method == "OPTIONS";
|
|
|
|
|
|
//avoid confusing cache behaviors
|
|
response.setHeader("Cache-Control", "no-cache", false);
|
|
|
|
if ("type" in query) {
|
|
response.setHeader("Content-Type", unescape(query['type']), false);
|
|
} else {
|
|
response.setHeader("Content-Type", "text/html", false);
|
|
}
|
|
|
|
if ("content" in query) {
|
|
response.write(unescape(query['content']));
|
|
}
|
|
}
|