[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: konquerer and PDFs
From:       David Faure <faure () kde ! org>
Date:       2008-09-22 20:55:47
Message-ID: 200809222255.48248.faure () kde ! org
[Download RAW message or body]

On Friday 19 September 2008, Jürgen Peter Messerer wrote:
> I'm not quite sure if I'm here in the right mailing list for my problem.

This is the right mailing-list.

> I have the following situation.
> 
> My Linux machine mounts a share on an IIS server with davfs.
> Now I'm accessing the share via konqueror.
> This share contains in general many PDF files.

So this is simply using file:/// URLs as far as konqueror knows, right?

> When I capature the network traffic with wireshark then I see, that
> konqueror also send a GET on every PDF.

I assume you mean, when just listing the directory?

> After searching the internet and studying the kdebase source I realize that
> normally konqueror are only sending GET's
> on files with unknown extensions.

Yep (except over protocols where extensions cannot be trusted, like HTTP)

> I have tried the following things:
> - Reregistering the mime type PDF
> - Disabled the file tips
> - Disbaled previews in file tips
> - Disabled all protocols on meta-data

Yep, disabling previews was my obvious first suggestion :)
So obviously that's not it.

Are you sure that Konqueror/kdelibs is the reason for this GET, and not
some issue in the davfs support?

To eliminate (or incriminate) mimetype checking, you will need to recompile kdelibs from
sources after applying the attached patch to kdelibs/kio/kio/kmimemagic.cpp
Then ensure 7018 is enabled in kdebugdialog, and run konqueror again.
If you don't understand the debug output, email it to me.
I can't do this myself, since I don't have any IIS server or davfs mount at hand
(didn't even know davfs existed).

In addition, to know whether it's konqueror or kio_file that is doing this,
you could simply use "strace -eopen konqueror 2>&1 | tee strace.log".
If konqueror isn't the one opening the pdf files, then kio_file is.

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).

["kmimemagic.cpp.diff" (text/x-diff)]

Index: kmimemagic.cpp
===================================================================
--- kmimemagic.cpp	(revision 794431)
+++ kmimemagic.cpp	(working copy)
@@ -2282,6 +2282,7 @@ KMimeMagicResult *
 KMimeMagic::findBufferFileType( const QByteArray &data,
 				const QString &fn)
 {
+    kdDebug(7018) << "KMimeMagic::findBufferFileType " << fn << endl;
         KMimeMagicResult * r = findBufferType( data );
 	refineResult(r, fn);
         return r;
@@ -2292,9 +2293,9 @@ KMimeMagic::findBufferFileType( const QB
  */
 KMimeMagicResult* KMimeMagic::findFileType(const QString & fn)
 {
-#ifdef DEBUG_MIMEMAGIC
+//#ifdef DEBUG_MIMEMAGIC
     kdDebug(7018) << "KMimeMagic::findFileType " << fn << endl;
-#endif
+//#endif
     conf->resultBuf = QString::null;
 
         if ( !magicResult )


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic