WebDav file rename

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
Abmea
Junior Member
Junior Member
Posts: 19
Joined: 2013-10-02, 15:45 UTC

WebDav file rename

Post by *Abmea »

Hi,

I noticed that TC fails to rename a file on the server via WebDav in my setup. The problem seems to be that the 'MOVE' command contains a relative path for the file source and a full UNC path for the file destination.

In my setup, that full path is not understood by the server because we have a complex proxy (TC ends up telling the server to move the file to https://192.168...), so the command fails.

Since a rename is always in the same destination folder, would it be possible to use a relative path for the destination as well?
Thanks in advance!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Hmm, I'm not quite sure whether this is allowed by the WebDAV specifications (RFC):

See: http://www.webdav.org/specs/rfc4918.html#HEADER_Destination
10.3 Destination Header

The Destination request header specifies the URI that identifies a destination resource for methods such as COPY and MOVE, which take two URIs as parameters.

Destination = "Destination" ":" Simple-ref

If the Destination value is an absolute-URI (Section 4.3 of [RFC3986]), it may name a different server (or different port or scheme). If the source server cannot attempt a copy to the remote server, it MUST fail the request. Note that copying and moving resources to remote servers is not fully defined in this specification (e.g., specific error conditions).
Where Simple-ref is defined as:
Simple-ref = absolute-URI | ( path-absolute [ "?" query ] )

So it must be either a complete address, or an absolute path starting with the root of the server "/". Or do I misundertand this?
Author of Total Commander
https://www.ghisler.com
Abmea
Junior Member
Junior Member
Posts: 19
Joined: 2013-10-02, 15:45 UTC

Post by *Abmea »

Ok, a path relative to the server root ("/") would work just fine for me!
In that case, TC would use the same type of path for the source and target.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

OK, please contact me by e-mail (support at ghisler dot com) and I will prepare a test version for you. It can take a few days, though, because I'm currently busy with the preparation of the final release of TC 8.50.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

A new beta version of the WebDAV plugin which implements this change is now publicly available here:

https://plugins.ghisler.com/beta/webdav_26b1.zip

It would be great if other users could try the rename function with this plugin too! If it doesn't work with some servers, please send me the error from the log, so I can write a workaround (e.g. calling the old rename function when the new one fails). Thanks!
Author of Total Commander
https://www.ghisler.com
inforte43
Junior Member
Junior Member
Posts: 17
Joined: 2014-02-12, 11:24 UTC

Post by *inforte43 »

Hi Ghisler,

Great that you improve the WebDAV plugin! ;-)

So, please, can you add the option to start the plugin parsing a URL?
You can found my suggestion for WebDAV and SFTP plugins at: http://www.ghisler.ch/board/viewtopic.php?p=279246#279246
User avatar
white
Power Member
Power Member
Posts: 5785
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

2ghisler(Author)
Please fix or remove Quick connection function.
damjang
Senior Member
Senior Member
Posts: 215
Joined: 2003-10-09, 15:58 UTC
Contact:

Post by *damjang »

Also if possible to add an option to disable "Content-Type" header.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Why? Content-Type is part of the http specifications.
Author of Total Commander
https://www.ghisler.com
Sob
Power Member
Power Member
Posts: 945
Joined: 2005-01-19, 17:33 UTC

Post by *Sob »

He is that one unlucky user from New beta plugin: WebDAV (WebFolders) thread, whose server has problems with Content-Type for some unknown reason.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I see - a new beta version of the WebDAV plugin is now publicly available here:
https://plugins.ghisler.com/beta/webdav_26b2.zip

You can now delete or rename the mime.types file and restart Total Commander to NOT send the Content-Type field.

I have also fixed the quick connection option.

Unfortunately I couldn't implement the CD plugin///@URL suggestion. Why? While I could parse the path, the location would still be shown as plugin///@URL because there is no way to redirect the path within the FsFindFirst function. This is only possible within FsExecute, which is only called when using the command line DURING an existing connection.
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5785
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote:I have also fixed the quick connection option.
It seems to use cached user name and password for the server entered. If I first connect using a saved connection and then use the Quick connection to connet to the same server, it simply connects when not entering a password (even when you enter a wrong user name). What is happening here?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50475
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Strange, according to the code, the connection settings should be cleared. Can you give me step by step instructions of what you are doing?
Author of Total Commander
https://www.ghisler.com
User avatar
white
Power Member
Power Member
Posts: 5785
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

ghisler(Author) wrote:Strange, according to the code, the connection settings should be cleared. Can you give me step by step instructions of what you are doing?
I have 2 saved connections (both secure via SSL). Passwords are stored and protected with Master password.
* I open saved connection 1, enter Master password,click Disconnect
* I open saved connection 2, click Disconnect
* I open Quick connection and enter same server as saved connection 1, optionally I enter a random user name, I enable SSL and click OK -> connection established....
* I click Disconnect, I open Quick connection and enter same server as saved connection 2, optionally I enter a random user name, I enable SSL and click OK -> connection established....
damjang
Senior Member
Senior Member
Posts: 215
Joined: 2003-10-09, 15:58 UTC
Contact:

Post by *damjang »

ghisler(Author) wrote:You can now delete or rename the mime.types file and restart Total Commander to NOT send the Content-Type field.
Thank you very much! Work ok if I rename mime.types file.

Damjan
Post Reply