PhilippC / PhilippC/keepass2android
[FEAT] [WebDAV] Please add a config value to set "User-Agent" HTTP(S) header to support proprietary WebDAV providers
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.2k
- Forks
- 478
- Avg merge
- 1h 4m
- Merged PRs (30d)
- 2
Description
Some - admittedly strange and not standard-compliant - proprietary WebDAV implementations do indeed require a client to pass proprietary values (for example, 'Microsoft-WebDAV-MiniRedir') as the value for HTTP(S) header 'User-Agent' with every HTTP(S) request from the WebDAV client to the WebDAV provider, or else they do not respond with the file content, but return HTTP error status codes (40x) and render HTML error pages about not being allowed to access this resource.
So can you please add a GUI setting to define a custom String for the User-Agent and pass this value as HTTP(S) header with the name 'User-Agent' and the value as configured through the newly introduced parameter with every HTTP(S) request to the WebDAV resource?
Note: If the user does NOT supply a non-empty value for this setting, please don't send an empty User-Agent HTTP(S) header, but leave the header out such that the request looks exactly the same like it does today.
I think that the HTTP request header part should be easy to implement with OkHttp Request.Builder's header(String name, String value) method, so the major part of the change probably will be adding the additional parameter to the GUI to be used as the User-Agent value.
Many thanks in advance! 😄
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the WebDAV HTTP request construction and the GUI settings used to configure WebDAV connections. Trace how a new setting would reach each request, then verify that a non-empty value sends the User-Agent header while an empty value preserves the current request behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, csharp
- Domain
- mobile, networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100