Index: scheduler/testmime.c
===================================================================
--- scheduler/testmime.c	(revision 5530)
+++ scheduler/testmime.c	(working copy)
@@ -98,6 +98,8 @@
       if (src)
 	printf("%s: %s/%s%s\n", argv[i], src->super, src->type,
 	       compression ? " (gzipped)" : "");
+      else if ((src = mimeType(mime, "application", "octet-stream")) != NULL)
+	printf("%s: application/octet-stream\n", argv[i]);
       else
       {
 	printf("%s: unknown\n", argv[i]);
@@ -158,7 +160,8 @@
 	     filter->dst->super, filter->dst->type,
 	     filter->filter, filter->cost);
 
-    type_dir(mime, "..");
+    type_dir(mime, "../doc");
+    type_dir(mime, "../man");
   }
 
   return (0);
@@ -280,6 +283,9 @@
 
   while ((dent = cupsDirRead(dir)) != NULL)
   {
+    if (dent->filename[0] == '.')
+      continue;
+
     snprintf(filename, sizeof(filename), "%s/%s", dirname, dent->filename);
 
     if (S_ISDIR(dent->fileinfo.st_mode))
Index: scheduler/printers.c
===================================================================
--- scheduler/printers.c	(revision 5530)
+++ scheduler/printers.c	(working copy)
@@ -2924,10 +2944,6 @@
        type;
        type = mimeNextType(MimeDatabase))
   {
-    if (!strcasecmp(type->super, "application") &&
-	!strcasecmp(type->type, "octet-stream"))
-      continue;
-
     snprintf(mimetype, sizeof(mimetype), "%s/%s", type->super, type->type);
 
     if ((filters = mimeFilter(MimeDatabase, type, p->filetype, NULL)) != NULL)
@@ -2953,14 +2969,20 @@
   * Add the file formats that can be filtered...
   */
 
+  if ((type = mimeType(MimeDatabase, "application", "octet-stream")) == NULL ||
+      !cupsArrayFind(p->filetypes, type))
+    i = 1;
+  else
+    i = 0;
 
   attr = ippAddStrings(p->attrs, IPP_TAG_PRINTER, IPP_TAG_MIMETYPE,
                        "document-format-supported",
 		       cupsArrayCount(p->filetypes) + 1, NULL, NULL);
 
-  attr->values[0].string.text = _cupsStrAlloc("application/octet-stream");
+  if (i)
+    attr->values[0].string.text = _cupsStrAlloc("application/octet-stream");
 
-  for (i = 1, type = (mime_type_t *)cupsArrayFirst(p->filetypes);
+  for (type = (mime_type_t *)cupsArrayFirst(p->filetypes);
        type;
        i ++, type = (mime_type_t *)cupsArrayNext(p->filetypes))
   {
