Open starius opened 1 week ago
Thank you for opening an Issue in our Repository. The issue has been forwarded to the team and we'll follow up as soon as we have time to investigate. As stated in our Contribution Guidelines, requests for feedback should be addressed via the Feedback section in the Android app.
I've been testing this scenario, and you are right, there are 2 /get request. However, not sure about the strategy to fix this.
My assumption is we are limited to the webview api here compared to other browsers. Will share this internally in case we can think about an approach.
@cmonfortep Thanks for the response!
I understand now, why sending a HEAD
request is not a good idea: in case of HTLM or image content it would cause an additional GET request to load the content.
What would you recommend to implement on the server side to make the site working in DuckDuckGO? Would the following approach work?
This seems as ad-hoc solution and it will fail in the future, if DDG starts downloading the data from the first request. However I don't see a better approach. What do you think?
What is a good way to distinguish the first request? Maybe header X-Requested-With
containing "duckduckgo" substring?
Describe the bug
I have a site which hosts one-time links: https://pastacity.nl/?tab=file After a file (e.g. PDF) is uploaded, it can be downloaded only once, by design of the site. (This is used a simple solution to share with some degree of privacy.)
This approach works well in many browsers, e.g. Firefox and Chrome both on PC and on mobile, but DuckDuckGo fails to download a file from such a link. The reason is that it sends two HTTP requests, both GET. The first GET request causes the link to expire and the second request (actual file download) is not working:
I think, DuckDuckGo should send the first request as HEAD, because it is a probing request, not expecting to download real data. Then my site (and similar sites) can distinguish the first request as a probe and to prevent data expiry so the second (real) request can successfully download it.
This issue was originally reported to the repo hosting the site: https://github.com/starius/pasta/issues/8#issuecomment-2035362389
How to Reproduce
In DuckDuckGo on Android:
Expected behavior
The file is downloaded back to your phone. (This actually works in other browsers.)
Environment