Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #367: custom providers with printf(3) format specifiers broken
A custom provider definition with printf() style format specifiers *and* multiple hostname was broken, as reported in issue #367. custom namecheap { username = YOURDOMAIN.TLD password = mypass ddns-server = dynamicdns.park-your-domain.com ddns-path = "/update?domain=%u&password=%p&host=%h" hostname = { "host1", "host2", "host3" } } The resulting HTTP requests were garbled, like this: GET /update?domain=YOURDOMAIN.TLD&password=mypass&host=host1 HTTP/1.0 GET /update?domain=YOURDOMAIN.TLD&password=mypass&host=host1host2 HTTP/1.0 GET /update?domain=YOURDOMAIN.TLD&password=mypass&host=host1host3 HTTP/1.0 The root cause was a legacy limitation causing the ddns-path to be overwritten on first entry with the first host. This patch fixes the limitation by always composing the HTTP request in a temporary buffer, using the custom ddns-path only as a template. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
- Loading branch information