Bug 126847 - webdav can be replaced with http
Summary: webdav can be replaced with http
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.4-beta3
Platform: Fedora RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-06 14:41 UTC by Ilya Konstantinov
Modified: 2006-06-11 12:32 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Patch (865 bytes, patch)
2006-05-13 12:59 UTC, Ilya Konstantinov
Details
Patch (Take 2) (947 bytes, patch)
2006-05-14 23:49 UTC, Ilya Konstantinov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Konstantinov 2006-05-06 14:41:07 UTC
Version:           1.4-beta3 (using KDE KDE 3.5.2)
Installed from:    Fedora RPMs

As there are no plans to use KIO to fetch data packets for the various engines to use, instead bestowing data access to the engines themselves, we can at least rely on the fact that most engines can stream from HTTP URLs and, when giving them webdav:// URLs (e.g. when a user browses a WebDAV site in the Files pane), replace webdav:// with http://.

(Technical note: WebDAV _is_ an addition of methods for HTTP for directory listing etc., but the actual retrieval of the file occurs through regular HTTP GET methods.)
Comment 1 Ilya Konstantinov 2006-05-13 12:59:26 UTC
Created attachment 16064 [details]
Patch

Simple patch, tested and found to work.
Comment 2 Thiago Macieira 2006-05-14 11:23:03 UTC
You have to replace webdavs with https too.
Comment 3 Ilya Konstantinov 2006-05-14 14:09:11 UTC
I didn't do it on purpose. Can any of our current engines handle https anyway?
Comment 4 Thiago Macieira 2006-05-14 17:52:44 UTC
Well, they for sure can't handle "webdavs".
Comment 5 Ilya Konstantinov 2006-05-14 23:49:33 UTC
Created attachment 16090 [details]
Patch (Take 2)

Changes webdav to http and webdavs to https.
Comment 6 Seb Ruiz 2006-05-18 14:54:29 UTC
SVN commit 542146 by seb:

Recognise webdav(s) as an http(s) protocol
BUG: 126847
CCMAIL: kde-bugzilla@future.shiny.co.il


 M  +2 -0      ChangeLog  
 M  +8 -1      src/enginecontroller.cpp  


--- trunk/extragear/multimedia/amarok/ChangeLog #542145:542146
@@ -21,6 +21,8 @@
       (BR 127043)
 
   BUGFIXES:
+    * Allow for recognition of the webdav protocol. Patch by Ilya 
+      Konstantinov <kde-bugzilla@future.shiny.co.il>. (BR 126847)
     * Setting a rating on an unplayed track would affect score generated.
       Patch by Patrick Muench <s7mon@web.de>. (BR 127475)
     * Stop tags with different capitalisation being treated as the same
--- trunk/extragear/multimedia/amarok/src/enginecontroller.cpp #542145:542146
@@ -312,7 +312,7 @@
     if ( !m_playFailureCount )
         failure_time.start();
 
-    const KURL url = bundle.url();
+    KURL url = bundle.url();
     debug() << "Loading URL: " << url.url() << endl;
     m_lastMetadata.clear();
 
@@ -332,6 +332,13 @@
     else
         amaroK::StatusBar::instance()->shortMessage( i18n("Connecting to stream source...") );
 
+    // WebDAV protocol is HTTP with extensions (and the "webdav" scheme
+    // is a KDE-ism anyway). Most engines cope with HTTP streaming, but
+    // not through KIO, so they don't support KDE-isms.
+    if ( url.protocol() == "webdav" )
+        url.setProtocol( "http" );
+    else if ( url.protocol() == "webdavs" )
+        url.setProtocol( "https" );
 
     if( m_engine->load( url, url.protocol() == "http" || url.protocol() == "rtsp" ) )
     {