2012 03 31 expiry + WebDAV plugin

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
SithLord
Junior Member
Junior Member
Posts: 14
Joined: 2010-04-01, 14:32 UTC

2012 03 31 expiry + WebDAV plugin

Post by *SithLord »

Hi Christian,

As my previous post, we're soon reaching the expiry date, a new release would be a delight ;-)

On another matter, it would be a HUGE improvement to add an option to the WebDAV plugin which already exists and works perfectly on TC for Windows :

"Use '/' as ending char for directories (if rename/delete fails)"

It's UNCHECKED by default in TC for Windows as I can see and with ALL my tests, always succeed to connect everywhere and especially with Web based software "emulating" WebDAV services (ie: ownCloud, Ajaxplorer and eXtplorer among others). They all have their WebDAV service in the form /path/to/file.php which confuses a lot TC4Android WebDAV plugin. It acts as if the forementioned option was always checked as I can see in the logs (ie: requested urls like /path/to/file.php/ which is wrong)

In fact, this option quite ALWAYS need to be UNCHECKED as I didn't see any side effects with it on TC for Windows even on regular WebDAV services (ie: Not emulated by web based software).

Pleeeeaaaase :P
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

OK, I can try to add that, but how can I test it? Is there some free cloud service which needs that option?
Author of Total Commander
https://www.ghisler.com
SithLord
Junior Member
Junior Member
Posts: 14
Joined: 2010-04-01, 14:32 UTC

Post by *SithLord »

Hi Christian,

I'm a bit embarassed :-) I've just tested against ownCloud demo service (using SabreDAV engine in PHP) using both TC4Win and TC4Droid and... both worked directly. They didn't some months ago when I first tried.

If you want to test on your own, here are the pointers :

http://demo.owncloud.org/dev/settings/users.php - To create your own user for testing. I created for myself login/pass : tc4a/tc4a

And, after that, to test directly with WebDAV service :
http://demo.owncloud.org/dev/files/webdav.php

There's also Ajaxplorer and eXtplorer both providing WebDAV access using they own implementation of WebDAV service. Unfortunately, their demo service have WebDAV disabled, so to test them, you'll have to install them locally.


Testing a friend's private service showed another problem but I doubt you can do anything about it. My friend's service is under HTTPS and he's doing "virtual hosting" in SSL (1 IP = Multiples sites).

With modern HTTP servers, it works without trouble whatever the browser is except for one thing : Modern browsers all support SNI - http://en.wikipedia.org/wiki/Server_Name_Indication - which allows the HTTP server to use the correct SSL certificate for the requested virtualhost.

Older browsers (ie: IE6) and, appearently, Android HTTP lib, do not support SNI so they get the FIRST (default) SSL certificate available in virtualhosts list of the HTTP server. If you host httpS://tc.org and httpS://ghisler.com on the same IP, Android (or older browsers) will get content from ghisler.com when requested but with tc.org SSL cert (thus issuing a warning because hostnames don't match).

My friend's service uses very strict rules that check SSL cert requests against hostnames so not supporting SNI leads to a HTTP 403 Forbidden error when trying to access.

You have much more insight in Android libs than I have so you might know better. Is SNI an option when making HTTPS requests or does the Android HTTP lib have no support for SNI whatsoever?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks for the hints, I will try it when I find the time. It would be nice to handle it automatically, but I seem to remember that some servers do NOT work when appending the slash to the URL...
Older browsers (ie: IE6) and, appearently, Android HTTP lib, do not support SNI so they get the FIRST (default) SSL certificate available in virtualhosts list of the HTTP server. If you host httpS://tc.org and httpS://ghisler.com on the same IP, Android (or older browsers) will get content from ghisler.com when requested but with tc.org SSL cert (thus issuing a warning because hostnames don't match).
I don't understand, do you want to say that the server returns multiple certificates? Or do you mean that I have to modify the https request to get the right certificate?
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I have tried to install Ajaxplorer, but I cannot get WebDAV to work. I enabled it in Settings - Global Configurations - Core configs - Ajaxplorer core, and then also for the user (Button "Logged as Admin"). It gives the following URLs:
Default files: http://localhost/ajaxplorer/shares/default
My Files: http://localhost/ajaxplorer/shares/my-files

But trying to connect to them gives error 405 Method not allowed.
Ajaxplorer is installed in /var/www/ajaxplorer/

What am I doing wrong? I found out that mod_rewrite wasn't installed by default on Linux Mint, but it doesn't work even after adding it.

Btw, in the logs I can see that my Windows plugin does send the path with trailing slash when getting the directory (PROPFIND command). Therefore listing dirs should work well also with the Android version. What exactly doesn't work then? Creating dirs? Renaming dirs? Deleting dirs?

Regarding SNI you seem to be right, the Apache HTTP functions used by TC don't support it on Android:
http://code.google.com/p/android/issues/detail?id=12908

It may work on Android 3 and 4, but maybe only in the Web browser...
Author of Total Commander
https://www.ghisler.com
Post Reply