keepass2android icon indicating copy to clipboard operation
keepass2android copied to clipboard

[FEAT] [WebDAV] Please add a config value to set "User-Agent" HTTP(S) header to support proprietary WebDAV providers

Open AndreasALoew opened this issue 3 months ago • 1 comments

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! 😄

AndreasALoew avatar Nov 07 '25 23:11 AndreasALoew

Addition: This feature is already implemented/resent in Keepass 2.x for WIndows, so it would also be great to reach feature parity here 😁

Image

Thanks again & have a nice weekend! :smile:

AndreasALoew avatar Nov 08 '25 12:11 AndreasALoew