rem: throw HTTP_501; 
add: var path = htmlEscape(metadata.path);        var body = '<html>\ <head>\ <title>' + path + '</title>\ </head>\ <body>\ <h1>' + path + '</h1>\ <ol style="list-style-type: none">';  var directory = metadata.getProperty("directory"); NS_ASSERT(directory && directory.isDirectory());  var fileList = []; var files = directory.directoryEntries; while (files.hasMoreElements()) { var f = files.getNext().QueryInterface(Ci.nsIFile); if (!f.isHidden()) fileList.push(f); }  fileList.sort(fileSort);  for (var i = 0; i < fileList.length; i++) { var file = fileList[i]; try { var name = file.leafName; var sep = file.isDirectory() ? "/" : "";    var item = '<li><a href="' + encodeURIComponent(name) + sep + '">' + htmlEscape(name) + sep + '</a></li>';  body += item; } catch (e) { /* some file system error, ignore the file */ } }  body    += '    </ol>\ </body>\ </html>';  response.bodyOutputStream.write(body, body.length); 
context: function defaultIndexHandler(metadata, response){  var file = metadata.getProperty("directory");  NS_ASSERT(file);  throw HTTP_501;  // need directory listings ftw!}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/8395/6b07e41dd66464a2b77c625189800fdb4ae27ca8/httpd.js/buggy/netwerk/test/httpserver/httpd.js