Use Base64#strict_encode64 for HTTP Basic authentication.  Extraneous newlines flabbergast IIS.