EldoS | Feel safer!

Software components for data protection, secure storage and transfer

TElWebDAVClient questions

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
#25870
Posted: 07/29/2013 18:18:07
by ZoĆ« Peterson (Priority Standard support level)
Joined: 05/24/2007
Posts: 22

1) Is there any way to automatically switch between NTLM, Digest, and Basic authentication using the TElWebDAVClient component? Windows' Explorer's built in "Map a network drive" will work with any of them automatically, but if I set either or both of TElHTTPSWebDAVClient's UseNTLMAuth and UseDigestAuth properties it will fail for various servers.

Right now I put a loop around my TElWebDAVClient.List() call, to set UseNTLMAuth, then UseDigestAuth, then neither, breaking out when it succeeds, and that works, but it seems inelegant.

2) Does the "BaseURL" property need to be set if I always pass in fully qualified URLs, and if so, can I just set it to "http://hostname/" without a path? Aside from the List()'s handling of '..' entries, which I've worked around, it doesn't appear to matter.

3) Does the "Owner" property do anything? The sample app just sets it to "http://test.com/" so it's not obvious what it's used for or what its value should be.

4) Just as a feature request, it would be nice if List() accepted an argument for PropFind's "Depth" parameter, rather than hardcoding wddOne.
#25873
Posted: 07/30/2013 01:52:57
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

Quote
1) Is there any way to automatically switch between NTLM, Digest, and Basic authentication using the TElWebDAVClient component? Windows' Explorer's built in "Map a network drive" will work with any of them automatically, but if I set either or both of TElHTTPSWebDAVClient's UseNTLMAuth and UseDigestAuth properties it will fail for various servers.

You can perform a single request with turned off authentication and handle TElHTTPSClient.OnReceivingHeaders event where you can analyze received headers and read what exact method is required by the server. Then you should set needed property to 'true'. TElHTTPUtils.GetHeaderByName will help to read needed header.

Quote
2) Does the "BaseURL" property need to be set if I always pass in fully qualified URLs, and if so, can I just set it to "http://hostname/" without a path? Aside from the List()'s handling of '..' entries, which I've worked around, it doesn't appear to matter.

When BaseURL property is set the component automatically checks WebDAV server class that can be read using SupportedClasses property. Its usefull to check if server supports locks. Also BaseURL property is needed when you use various methods like List, Upload etc. Anyway you may skip setting it and use methods that accept full URL as a parameter.

Quote
3) Does the "Owner" property do anything? The sample app just sets it to "http://test.com/" so it's not obvious what it's used for or what its value should be.

This property is used for locking. Please refer to this RFC part for details: https://tools.ietf.org/html/rfc4918#page-85

Quote
4) Just as a feature request, it would be nice if List() accepted an argument for PropFind's "Depth" parameter, rather than hardcoding wddOne.

We'll add this feature however major part of servers will reject list requests with "infinity" depth as they require too much resources to generate a response.

Reply

Statistics

Topic viewed 540 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!