No query attachments allowed for urls passed to kioslaves?

Friedrich W. H. Kossebau kossebau at kde.org
Sun Feb 8 15:53:02 GMT 2009


Le dimanche, 8. février 2009, à 15:04, Friedrich W. H. Kossebau a écrit:
> Le dimanche, 8. février 2009, à 11:35, Allan Sandfeld Jensen a écrit:
> > > If yes,
> > > is there a reason querys get stripped from urls before they get passed
> > > to a kioslave?
> >
> > No, querys to not get stripped from urls, otherwise most PHP/ASP sites
> > would not work at all. So you have probably encountered some special bug.
>
> Meanwhile I encoded the service url in the path. The url
> 	service://workstation/fantasy/gibt.es.auch.nicht/
> works if I click on it, but if I enter it in the url bar and press enter,
> the kioslave receives the url with the trailing "/" cut away
> 	service://workstation/fantasy/gibt.es.auch.nicht
>
> This is both the same for using UDS_URL and UDS_TARGET_URL as keys.
>
> Looking at the log (attached) I wonder:
> How comes
> 	KParts::BrowserRun::scanFile: MIME TYPE is "inode/directory"
> when none of the slots in my kioslave are called to find this out?

Because currently it uses KMimeType::findByUrl( KRun::url() ) for all non-http 
and queryless urls. And ends with guessing from the listing capability and 
the trailing "/" it will be a directory. 
00375             if ( prot && prot->supportsListing() ) {
00376                 KMimeType::Ptr mime = mimeType( 
QLatin1String("inode/directory") );

But why did I then reimplement the mimetype( KURL ) method of KIO::SlaveBase? 
Ah, there is no guarantue that it will not include heavy data loading. Or?

Could there perhaps be a flag that there the protocol has lightweight mimetype 
detection? This could also help with the rest of BrowserRun::scanFile(), 
where I wonder why not just HTTPProtocol::mimetype( KUrl ) is used?

> Still in the end it says
> 	konqueror(23113) KonqView::openUrl: url=
> KUrl("service://workstation/fantasy/gibt.es.auch.nicht/")
> locationBarURL= "service://workstation/fantasy/gibt.es.auch.nicht/"
> 	kio_slp(23115) ServicesSlave::listDir: url=
> KUrl("service://workstation/fantasy/gibt.es.auch.nicht")
> So who could munge away the trailing "/" between the two log enties (the
> url stays unchanged in ServicesSlave::listDir(), so it should not be the
> ioslave)
>
> I played with different values for "URIMode" in the protocol file but that
> had no effect (should it have? hopefully I never forgot kbuildsycoca4).

Still not solved.

Cheers
Friedrich
-- 
Okteta - KDE 4 Hex Editor - http://utils.kde.org/projects/okteta




More information about the kfm-devel mailing list