Index: tools/gformat.py
===================================================================
--- tools/gformat.py	(revision 10058)
+++ tools/gformat.py	(revision 10060)
@@ -592,6 +592,10 @@
   output = ""
   if not uri[0]:
-    output += "Content-type:text/html\r\n\r\n"
-    output += generate_title(get_hostlist())
+    if os.environ['HTTP_USER_AGENT'].startswith('fetch '):
+      output += "Content-type:text/plain\r\n\r\n"
+      output += '\n'.join(get_hostlist())
+    else:
+      output += "Content-type:text/html\r\n\r\n"
+      output += generate_title(get_hostlist())
   elif len(uri) == 1:
     output += "Content-type:text/plain\r\n\r\n"
