Feature #4071: support basic auth for Net::HTTP.get requests
http://redmine.ruby-lang.org/issues/show/4071

Author: coderrr .
Status: Open, Priority: Normal
Category: lib

support basic auth for Net::HTTP.get(URI.parse("http://user:pass@whatever=
.com/asdf"))


----------------------------------------
http://redmine.ruby-lang.org
RnJvbSA0Yjg4ODNhYTk2ZWNiMTg3OGU0YjM3MzZiOTM3OWI2OGU0OTU4ZDVi
IE1vbiBTZXAgMTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBjb2RlcnJyIDxjb2Rl
cnJyLmNvbnRhY3RAZ21haWwuY29tPgpEYXRlOiBGcmksIDE5IE5vdiAyMDEw
IDEzOjQ4OjMxICswNzAwClN1YmplY3Q6IFtQQVRDSF0gc3VwcG9ydCBiYXNp
YyBhdXRoIGZvciBOZXQ6OkhUVFAuZ2V0IHJlcXVlc3RzCgotLS0KIGxpYi9u
ZXQvaHR0cC5yYiB8ICAgIDQgKysrLQogMSBmaWxlcyBjaGFuZ2VkLCAzIGlu
c2VydGlvbnMoKyksIDEgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvbGli
L25ldC9odHRwLnJiIGIvbGliL25ldC9odHRwLnJiCmluZGV4IDMzYzg4Yzgu
LjlhYWMzMzUgMTAwNjQ0Ci0tLSBhL2xpYi9uZXQvaHR0cC5yYgorKysgYi9s
aWIvbmV0L2h0dHAucmIKQEAgLTM5MSw3ICszOTEsOSBAQCBtb2R1bGUgTmV0
ICAgIzpub2RvYzoKICAgICAgIGVsc2UKICAgICAgICAgdXJpID0gdXJpX29y
X2hvc3QKICAgICAgICAgbmV3KHVyaS5ob3N0bmFtZSwgdXJpLnBvcnQpLnN0
YXJ0IHt8aHR0cHwKLSAgICAgICAgICByZXR1cm4gaHR0cC5yZXF1ZXN0X2dl
dCh1cmkucmVxdWVzdF91cmksICZibG9jaykKKyAgICAgICAgICBnZXQgPSBH
ZXQubmV3KHVyaS5yZXF1ZXN0X3VyaSkKKyAgICAgICAgICBnZXQuYmFzaWNf
Y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