Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote-Target detection fails in some cases #35

Open
MarcusWichelmann opened this issue Nov 15, 2018 · 1 comment
Open

Remote-Target detection fails in some cases #35

MarcusWichelmann opened this issue Nov 15, 2018 · 1 comment
Assignees

Comments

@MarcusWichelmann
Copy link
Contributor

MarcusWichelmann commented Nov 15, 2018

Hi,

some clients (for example Linux Mint's file-explorer "Nemo") add the username to the WebDAV-URL like https://[email protected]:8080/....

This causes any Copy & Move-Operation to fail with an exception:

 FubarDev.WebDavServer.AspNetCore.Filters.WebDavExceptionFilter - The destination server didn't return a response FubarDev.WebDavServer.Engines.Remote.RemoteTargetException: The destination server didn't return a response
   at FubarDev.WebDavServer.Engines.Remote.RemoteHttpClientTargetActions.GetAsync(RemoteCollectionTarget collection, String name, CancellationToken cancellationToken)
   at FubarDev.WebDavServer.Handlers.Impl.CopyMoveHandlerBase.RemoteExecuteAsync(IRemoteTargetActions handler, Uri sourceUrl, SelectionResult sourceSelectionResult, Uri targetUrl, DepthHeader depth, Boolean overwrite, CancellationToken cancellationToken)
   at FubarDev.WebDavServer.Handlers.Impl.CopyMoveHandlerBase.ExecuteAsync(String sourcePath, Uri destination, DepthHeader depth, Boolean overwrite, RecursiveProcessingMode mode, Boolean isMove, CancellationToken cancellationToken)
   at FubarDev.WebDavServer.Handlers.Impl.CopyMoveHandlerBase.ExecuteAsync(String sourcePath, Uri destination, DepthHeader depth, Boolean overwrite, RecursiveProcessingMode mode, Boolean isMove, CancellationToken cancellationToken)

Because of FubarDev.WebDavServer.Handlers.Impl.MoveHandler - https://webdav.domain.de:8080/ is not a base of https://[email protected]:8080/Folder/NewFolder.

Code:

if (!WebDavContext.PublicControllerUrl.IsBaseOf(destinationUrl) || mode == RecursiveProcessingMode.PreferCrossServer)

Could you please extend this check to handle corner-cases like that?

I'd also be very helpful if there was a way to disable this check completely when the Remote-Target functionallity is never needed because an URL-Check like this adds some unneccessary development-difficulties when a proxy is used or ports differ.

@MarcusWichelmann MarcusWichelmann changed the title Remote-Server detection fails in some cases Remote-Target detection fails in some cases Nov 15, 2018
@fubar-coder
Copy link
Collaborator

It's a performance optimization that went wrong here. Maybe we should use a service to implement checks for those stuff.

@fubar-coder fubar-coder self-assigned this Nov 15, 2018
fubar-coder added a commit that referenced this issue Dec 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants