Bug 87769 - kio webdav get indistinguishable from http get
Summary: kio webdav get indistinguishable from http get
Status: RESOLVED WORKSFORME
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: webdav (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: Hamish Rodda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-22 18:50 UTC by Tino Wildenhain
Modified: 2006-03-02 15:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tino Wildenhain 2004-08-22 18:50:26 UTC
Version:            (using KDE KDE 3.3.0)
Installed from:    Debian testing/unstable Packages
OS:                Linux

when loading resources via webdav://
the request is translated into a 
http:// GET request with no additional
information. So the server cannot decide
to send the page source instead of the 
rendered output. While for example zope
has a configuration to allow a server
on another port to only handle webdav source
requests, this setup isnt possible in all
cases.

It would be better to have anything in the
request to see if it orginates a webdav://
request and not http://

A nice solution would be to add KIO or
WEBDAV or DAV to UserAgent header when
a resource is requestet thru webdav://
this is especially useful because Zope
lets you configure a regular expression
on the useragent to decide it should deliver
source.
Comment 1 Anke Börnig 2005-04-01 13:26:20 UTC
*** This bug has been confirmed by popular vote. ***
Comment 2 Thiago Macieira 2005-04-03 19:18:23 UTC
Does any other WebDAV client implement a functionality similar to this?
Comment 3 Tino Wildenhain 2005-04-04 09:47:34 UTC
There is no other client which either is a http client the same time or 
fails to implement the dav source property support as requested by the 
standard.

So the above solution would just serve as a quick hack - while cheap
to implement and solving the problem short term - the really
solution - supporting the source property still needs to be done.
(see also http://bugs.kde.org/show_bug.cgi?id=79431 )

Compare also with reverence implementation "cadaver" as command line
dav client.
Comment 4 Hamish Rodda 2005-12-28 05:55:41 UTC
The dav source property is the proper way to provide this functionality as per the RFC.  The http ioslave already provides this property as metadata "davSource" on a stat request.  It is up to applications to support this, not the ioslave.

Appending to the User-Agent string is a possibility, although it is a hack, so if there's support from the kio_http maintainers it could be added.
Comment 5 Patrick Gerken 2006-03-02 14:21:40 UTC
It is actually not a bug. It could be a feature request, that konqueror allows to get the webdav source, or that kate honours the DAV:SOURCE attribute properly.
Comment 6 Tino Wildenhain 2006-03-02 14:29:54 UTC
No its not. According to the sources, the KIO lib claims to be in accordance to rfc2518:
(excerpt from said rfc)

13.10 source Property

   Name:       source
   Namespace:  DAV:
   Purpose:    The destination of the source link identifies the
   resource that contains the unprocessed source of the link's source.
   Description: The source of the link (src) is typically the URI of the
   output resource on which the link is defined, and there is typically
   only one destination (dst) of the link, which is the URI where the
   unprocessed source of the resource may be accessed.  When more than
   one link destination exists, this specification asserts no policy on
   ordering.


So I'd consider it as a bug :-)
(or "forgot to implement")

The easiest "fix" would be to omit the reference to rfc2518 in the sources, however proper support for that property would be better I think.

Regards
Tino
Comment 7 Hamish Rodda 2006-03-02 14:57:40 UTC
As I wrote above, kio_http detects this property and dutifully passes it on to applications.

Please file your wishes against the application(s) that you want to support this property.
Comment 8 Tino Wildenhain 2006-03-02 15:11:57 UTC
Which version of the slaves do that? The version that comes with KDE 3.5.0
(or at least konqueror) does not support it.

See capture:

<?xml version="1.0" encoding="utf-8"?>
<d:multistatus xmlns:d="DAV:">
<d:response>
<d:href>/Templates/StandardText/</d:href>
<d:propstat>
  <d:prop>
<n:creationdate xmlns:n="DAV:">1970-01-01T12:00:00Z</n:creationdate>
<n:getcontentlength xmlns:n="DAV:"></n:getcontentlength>
<n:displayname xmlns:n="DAV:">StandardText</n:displayname>
<n:source xmlns:n="DAV:"></n:source>
<n:getcontenttype xmlns:n="DAV:"></n:getcontenttype>
<n:getlastmodified xmlns:n="DAV:">Thu, 29 Sep 2005 10:09:03 GMT</n:getlastmodified>
<n:supportedlock xmlns:n="DAV:">
  <n:lockentry>
  <d:lockscope><d:exclusive/></d:lockscope>
  <d:locktype><d:write/></d:locktype>
  </n:lockentry>
  </n:supportedlock>
<n:lockdiscovery xmlns:n="DAV:">

</n:lockdiscovery>
<n:resourcetype xmlns:n="DAV:"><n:collection/></n:resourcetype>
  </d:prop>
  <d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
  <d:prop>
<n:getcontentlanguage xmlns:n="DAV:"/>
<n:executable xmlns:n="DAV:"/>
<n:getetag xmlns:n="DAV:"/>
  </d:prop>
  <d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/Templates/StandardText/floatingtext.pt</d:href>
<d:propst
at>
  <d:prop>
<n:creationdate xmlns:n="DAV:">1970-01-01T12:00:00Z</n:creationdate>
<n:getcontentlength xmlns:n="DAV:">1441</n:getcontentlength>
<n:displayname xmlns:n="DAV:">floatingtext.pt</n:displayname>
<n:source xmlns:n="DAV:">
  <n:link>
  <n:src>/Templates/StandardText/floatingtext.pt</n:src>
  <n:dst>/Templates/StandardText/floatingtext.pt/document_src</n:dst>
  </n:link>
  </n:source>
<n:getcontenttype xmlns:n="DAV:">text/html</n:getcontenttype>
<n:getlastmodified xmlns:n="DAV:">Tue, 20 Sep 2005 09:50:54 GMT</n:getlastmodified>
<n:supportedlock xmlns:n="DAV:">
  <n:lockentry>
  <d:lockscope><d:exclusive/></d:lockscope>
  <d:locktype><d:write/></d:locktype>
  </n:lockentry>
  </n:supportedlock>
<n:lockdiscovery xmlns:n="DAV:">

</n:lockdiscovery>
<n:resourcetype xmlns:n="DAV:"></n:resourcetype>
  </d:prop>
  <d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
  <d:prop>
<n:getcontentlanguage xmlns:n="DAV:"/>
<n:executable xmlns:n="DAV:"/>
<n:getetag xmlns:n="DAV:"/>
  </d:prop>
  <d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>