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

Interoperability with AmpliStor #8158

Closed
cyberduck opened this issue Aug 7, 2014 · 1 comment
Closed

Interoperability with AmpliStor #8158

cyberduck opened this issue Aug 7, 2014 · 1 comment
Assignees
Labels
bug thirdparty Issue caused by third party webdav WebDAV Protocol Implementation

Comments

@cyberduck
Copy link
Collaborator

741274c created the issue

CyberDuck fails to upload files

The strange thing is, this was working for quite some time with this System and then it suddenly started failing. I have tried various revisions on the MAC, and Windows with no luck.

tcpdumps, of successful curl and failure of CyberDuck uploads included

Server side, log file also attached, which demonstrates the issue.

Details below from AmpliData Engineering.

The cause of the bug in Cyberduck is (again) the combination of the use of HTTP digest authentication and the Expect: 100-continue header.
The issue with 100-continu is that there is no guarantee that the server will actually send this. The HTTP RFC instructs the client not to wait indefinitely on the 100-continue reply. This means that the server has no way of knowing whether the body of the request will be sent by the client or not, regardless of whether it has sent the 100-continue reply or it has sent an error code back. To make this work in all cases, there are only 2 options available to the server if it replies with something else than 100-continue:

  1. Always close the connection
  2. Always read the body (and expect that the body is in fact sent by the client)
    The behaviour of DSS is configurable (there is a threshold content-length for which it will close the connection if the actual content-length is larger than this value, and it will read the body when it is smaller).
    This only works correctly if the client also is aware of this behaviour of 100-continue. E.g. for Curl, this is the case, but Cyberduck will wait indefinitely for the 100-continue response, and not send the body if it receives something else (e.g. 401). DSS expects the body to be sent in all cases (if option 2 is chosen), and thus start reading the body which Cyberduck never has sent. DSS will thus interpret the next Cyberduck requests as part of the body. Once it has read content-length bytes, DSS expects that the next bytes on the connection will be a new request. In the Cyberduck case, it is likely that we are now in the middle of the body of another request, which will most likely not be a valid HTTP request, and definitely not an intended HTTP request.
    If option 1 is active, this problem should not occur, but it appears that Cyberduck also does not handle server side disconnects gracefully: it should retry the request on a new connection, but it seems to simply throw a broken pipe exception to the user. There is a remote chance that this is because DSS does not send Connection: close in its response. This is still something in AXR that is not 100% correct according to the HTTP specs. Still, Cyberduck should handle this more gracefully.
    There is no way to make the behaviour of (2) in DSS work with Cyberduck without breaking other (valid) HTTP clients like Curl. This should be fixed in Cyberduck. We can try to make (1) work with Cyberduck by adding Connection: close, but most likely Cyberduck will still need to be fixed as well.

Attachments

@cyberduck
Copy link
Collaborator Author

@dkocher commented

The server should not expect payload to be sent if it replies with a 401 to a request with an Expect header set.

@iterate-ch iterate-ch locked as resolved and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug thirdparty Issue caused by third party webdav WebDAV Protocol Implementation
Projects
None yet
Development

No branches or pull requests

2 participants