gecko-dev/content/base/test/header.sjs
2008-11-04 23:35:39 -05:00

9 lines
337 B
JavaScript

function handleRequest(request, response) {
response.setHeader("Content-Type", "text/plain", false);
response.setHeader("Cache-Control", "no-cache", false);
var value = request.hasHeader("SomeHeader") ? request.getHeader("SomeHeader")
: "";
response.write("SomeHeader: " + value);
}