HTTrack Website Copier
Free software offline browser - FORUM
Subject: Re: Fixing the mime type of a specific url
Author:
Date: 01/14/2005 14:36
 
I created a patch to allow this:

*** src/htsname.c       2004-12-20 19:51:33.000000000 +0100
--- /root/htsrc/htsname.c       2005-01-14
14:33:16.000000000 +0100
***************
*** 360,364 ****
            }
            //
!         } else {          // test imposible dans le cache,
faire une requête
            //
  #if HTS_ANALYSTE
--- 360,378 ----
            }
            //
!         } else {    /* PATCH BY BRIAN SCHRÖDER. Lookup
mimetype not only by extension, but also by filename */
!         if (is_userknowntype(fil)) {      // mime known by
user
!           char BIGSTK mime[1024];
!           mime[0]=ext[0]='\0';
!           get_userhttptype(0,mime,fil);
!           if (strnotempty(mime)) {
!             give_mimext(ext,mime);
!             if (strnotempty(ext)) {
!               ext_chg=1;
!             }
!           }
!         } else
!           // test imposible dans given mime type
!           /* END OF PATCH */
!           {          // test imposible dans le cache,
faire une requête
              //
  #if HTS_ANALYSTE
***************
*** 606,609 ****
--- 620,624 ----
        }
      }
+   }


Feel free to use or improve upon it.

Regards,

Brian Schröder
 
Reply Create subthread


All articles

Subject Author Date
Fixing the mime type of a specific url

01/13/2005 18:55
Re: Fixing the mime type of a specific url

01/14/2005 14:36
Re: Fixing the mime type of a specific url

01/21/2005 11:33
Re: Fixing the mime type of a specific url

01/22/2005 09:34




f

Created with FORUM 2.0.11