python-caldav / caldav

Apache License 2.0
312 stars 91 forks source link

User-Agent should be configurable #385

Closed tobixen closed 2 months ago

tobixen commented 4 months ago

Ref https://github.com/home-assistant/core/issues/105292#issuecomment-1979244046 - it seems like it's possible to set arbitrary headers to be sent in every request initiated through some davclient object, except User-Agent and some others. Now it's probably a good idea not to touch the Content-Type or Accept-headers, but the User-Agent should be possible to configure freely.

Also, passing {} as default parameter is dangerous, ref https://stackoverflow.com/questions/26320899/why-is-the-empty-dictionary-a-dangerous-default-value-in-python

tobixen commented 2 months ago

fixed