From 4ee62863e5f5900b764442d0270c025258c051f7 Mon Sep 17 00:00:00 2001 From: Bastian Kleineidam Date: Fri, 11 Mar 2011 13:30:34 +0100 Subject: [PATCH] Recognize PHP files as HTML files on Windows. --- linkcheck/fileutil.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/linkcheck/fileutil.py b/linkcheck/fileutil.py index f9c4a78f..60cd8afa 100644 --- a/linkcheck/fileutil.py +++ b/linkcheck/fileutil.py @@ -183,6 +183,9 @@ def has_changed (filename): mimedb = mimetypes.MimeTypes(strict=False) # For Opera bookmark files (opera6.adr) mimedb.add_type('text/plain', '.adr', strict=False) +# To recognize PHP files as HTML with content check. +mimedb.add_type('text/plain', '.php', strict=False) + # if file extension lookup was unsuccessful, look at the content PARSE_CONTENTS = {