Thu, 15 Jan 2015 21:03:48 +0100
Integrate friendly tips from Tor colleagues to make (or not) 4.5 alpha 3;
This includes removal of overloaded (but unused) methods, and addition of
a overlooked call to DataStruct::SetData(nsISupports, uint32_t, bool.)
1 /**
2 * Dynamically generated page whose title matches the given id.
3 */
5 function handleRequest(request, response) {
6 let id = request.queryString.match(/^id=(.*)$/)[1];
7 let key = "dynamic." + id;
9 response.setStatusLine(request.httpVersion, 200, null);
10 response.setHeader("Content-Type", "text/html", false);
11 response.setHeader("Cache-Control", "no-cache", false);
12 response.write('<html>');
13 response.write('<head><title>' + id + '</title><meta charset="utf-8"></head>');
14 response.write('<body>');
15 response.write('<h1>' + id + '</h1>');
16 response.write('</body>');
17 response.write('</html>');
18 }