https://tickets.puppetlabs.com/browse/MODULES-4913
Prior to this commit, apt_key always sent auth basic header when source
came from http(s). This might fail for some webservers (e.g. Amazon S3)
when empty auth basic is sent.
Now apt_key only sends the auth basic header when userinfo can
be parsed from the URL.
Please backport this to 2.4.x, since this is the release before incompatibility changes are made.