duplicati
duplicati copied to clipboard
Frontend should not rely on the status text of the HTTP responses
- [x] I have searched open and closed issues for duplicates.
- [x] I have searched the forum for related topics.
Environment info
- Duplicati version: 2.0.6.3_beta_2021-06-17
- Operating system: Ubuntu 20.04
- Backend: Google Drive, but all of them are possibly implicated
Description
It all started here https://forum.duplicati.com/t/unable-to-specify-path-when-using-google-drive/12891/15 if you want all the details
Basically when you run Duplicati behind a reverse proxy using HTTP/2 (like Caddy), the status text part of the responses (aka reason phrase) gets stripped and replaced. This is expected behavior since HTTP/2 does not support it, and HTTP/1 specs says it's just for human users, not automata. Bottom line is, it shouldn't be used. The problem is the frontend relies on it for its logic (here for example). This means frontend will be malfunctioning for every user running on HTTP/2 or more.
Steps to reproduce
Just put Caddy in front of it I suppose 🤷♂️ I experienced the issue here if you want to replicate it in a VM for example (just remove all the non Duplicati stuff in the docker-compose .yml
file)
- Actual result: N/A
- Expected result: N/A
Screenshots
Debug log
N/A
This issue has been mentioned on Duplicati. There might be relevant details there:
https://forum.duplicati.com/t/unable-to-specify-path-when-using-google-drive/12891/21
@LeonardMeyer did you find any resolution on this? happening also in traefik
This can be fixed pretty easily in a future release, because the error is also sent as JSON data (visible in the screenshot).
@idanlah What is your use case? If you only want to know the reason for an error you get, you can open the Network tab in the browser debugger and look at the response there.
If you absolutely need a fix for this now, you can theoretically even modify the JavaScript files in the install folder to make them work.
its the same use case as the OP mentioned. trying to Test Connection in Google Drive doesn't pop up "folder does not exist" window. i can fix it in js but ill need to look for all the places where it can happen, it doesn't happen only in this case.