mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-07 19:59:18 +02:00
MozReview-Commit-ID: 4Z3OKDY5aYI --HG-- extra : transplant_source : %5B%00%94%FDW%3Dn%80V%90N8%0D%5E%BB%B1%BBA%00E
16 lines
415 B
JavaScript
16 lines
415 B
JavaScript
function handleRequest(request, response)
|
|
{
|
|
var query = {};
|
|
request.queryString.split('&').forEach(function (val) {
|
|
var [name, value] = val.split('=');
|
|
query[name] = unescape(value);
|
|
});
|
|
|
|
if (request.method == "POST") {
|
|
setState(query["id"], "ping");
|
|
} else {
|
|
var value = getState(query["id"]);
|
|
response.setHeader("Content-Type", "text/plain", false);
|
|
response.write(value);
|
|
}
|
|
}
|