From: <mic...@bt...> - 2007-05-08 09:34:29
|
Klaus, The most important part is that htdig is set up with the correct = mime-type mappings.=20 I would suggest that you check the header returned by your server = somehow: options include the 'LiveHTTPheaders' extension in Firefox, a = direct telnet to port 80, or verbose options with something like WGET. = That would eliminate any remaining confusion over what mime-type is = being used - as you can see, there is a degree of faith required that = the web server picks the 'correct' mime-type in each case! =20 If it does turn out to be returning application/octet-stream that needs = to be fixed, but otherwise I would just put in a line for every possible = variation of the WordPerfect mime-type - as you spotted, doc2html makes = its own attempt to identify which kind of document it is given, which is = independent of mime-type. =20 Hope that helps, Mike=20 =20 =20 ________________________________ From: htd...@li... = [mailto:htd...@li...] On Behalf Of Klaus = B=F6mken Sent: Sunday, May 06, 2007 7:14 PM To: htd...@li... Subject: Re: [htdig] doc2html unable to convert wordperfect =09 =09 That is a point that I am very uncertain about . Here is what I can = tell after reading more of the documentation. =09 This is part of my /usr/share/file/magic: =09 >#WordPerfect type files Version 1.6 - PLEASE DO NOT REMOVE THIS LINE >0 string = \377WPC\020\000\000\000\022\012\001\001\000\000\000\000 (WP) loadable = text >>15 byte 0 Optimized for Intel >>15 byte 1 Optimized for Non-Intel >1 string WPC (Corel/WP) >>8 short 257 WordPerfect macro (and so on) =09 This is part of my /etc/mime.types: =09 >application/wordperfect wpd >application/wordperfect5.1 wp5 =09 Now if I use the file-command: =09 >file mswordfile.doc >mswordfile.doc: Microsoft Office Document =09 >file -i mswordfile.doc >mswordfile.doc: application/msword =09 That's what I would expect. But: =09 >file wordperfectfile.wpd >wordperfectfile.wpd: (Corel/WP) =09 >file -i wordperfectfile.wpd >wordperfectfile.wpd: application/octet-stream =09 ... seems wrong to me. =09 On the other hand: how does doc2html identify file-types?=20 =09 I'm not familiar with perl, but it seems to me that there is some sort = of comparison with "\377" within the perl-script. =09 In this respect: =09 >od -b wordperfectfile.wpd | head >0000000 377 127 120 103 365 007 000 000 001 012 002 001 000 000 000 = 002 =09 ... seems correct to me. =09 Would this be the information you asked about? What can I do next? =09 Thanks for your help, Klaus =09 =09 >-------in reply to Re: [htdig] doc2html unable to convert wordperfect=20 michael.brockington Fri, 04 May 2007 01:58:35 -0700 Have you got any idea what mime-type your server is putting out for = these=20 documents? The key is that what you have in your config file must match what your = server=20 is saying, regardless of whether either of them is technically correct. =09 Regards, Mike =20 =09 > -----Original Message----- > From: [EMAIL PROTECTED]=20 > [mailto:[EMAIL <mailto:%5BEMAIL> PROTECTED] On=20 > Behalf Of Klaus B=F6mken > Sent: Wednesday, May 02, 2007 7:56 PM > To: htd...@li... > Subject: [htdig] doc2html unable to convert wordperfect >=20 =09 <snip> =09 >=20 > I read some stuff about mime-types that I don't understand.=20 > Is it matter > of wordperfect-versions? >=20 > Any hints? >=20 > Klaus >=20 --=20 ************************* Klaus B=F6mken Herzogstra=DFe 89b 46145 Oberhausen =09 Fon: 0208-612018 Mobil: 0163-8898 436 Mail: kl...@bo...=20 |