From: "あつし よしだ" Date: 2011-02-10T14:15:52+09:00 Subject: [ruby-dev:43186] [Ruby 1.9-Bug#4388][Open] open-uriで環境変数http_proxyを使うときに認証付きのProxyが使えません --mimepart_4d537484a0807_59839fba0fa53bf Content-Type: text/plain Content-Transfer-Encoding: Quoted-printable Content-Disposition: inline Bug #4388: open-uri=E3=81=A7=E7=92=B0=E5=A2=83=E5=A4=89=E6=95=B0http_prox= y=E3=82=92=E4=BD=BF=E3=81=86=E3=81=A8=E3=81=8D=E3=81=AB=E8=AA=8D=E8=A8=BC= =E4=BB=98=E3=81=8D=E3=81=AEProxy=E3=81=8C=E4=BD=BF=E3=81=88=E3=81=BE=E3=81= =9B=E3=82=93 http://redmine.ruby-lang.org/issues/show/4388 =E8=B5=B7=E7=A5=A8=E8=80=85: =E3=81=82=E3=81=A4=E3=81=97 =E3=82=88=E3=81=97= =E3=81=A0 =E3=82=B9=E3=83=86=E3=83=BC=E3=82=BF=E3=82=B9: Open, =E5=84=AA=E5=85=88=E5= =BA=A6: Normal =E3=82=AB=E3=83=86=E3=82=B4=E3=83=AA: lib ruby -v: ruby 1.9.2p136 (2010-12-25 revision 30365) [i686-linux] =E5=86=85=E5=AE=B9=E3=81=AF=E3=82=BF=E3=82=A4=E3=83=88=E3=83=AB=E3=81=AE=E3= =81=BE=E3=81=BE=E3=81=A7=E3=81=99=E3=80=82 =E3=83=91=E3=83=83=E3=83=81=E3=82=92=E6=B7=BB=E4=BB=98=E3=81=97=E3=81=BE=E3= =81=99=E3=81=AE=E3=81=A7=E3=82=88=E3=82=8D=E3=81=97=E3=81=8F=E3=81=8A=E9=A1= =98=E3=81=84=E3=81=97=E3=81=BE=E3=81=99=E3=80=82 ---------------------------------------- http://redmine.ruby-lang.org --mimepart_4d537484a0807_59839fba0fa53bf Content-Type: text/x-patch; name=open-uri_with_http_proxy.patch Content-Transfer-Encoding: Base64 Content-Disposition: attachment; filename=open-uri_with_http_proxy.patch ZGlmZiAtLWdpdCBhL2xpYi9vcGVuLXVyaS5yYiBiL2xpYi9vcGVuLXVyaS5y YgppbmRleCBjODM5M2ZhLi43NDJjZjE4IDEwMDY0NAotLS0gYS9saWIvb3Bl bi11cmkucmIKKysrIGIvbGliL29wZW4tdXJpLnJiCkBAIC0xODMsNyArMTgz LDE0IEBAIG1vZHVsZSBPcGVuVVJJCiAgICAgZW5kCiAgICAgY2FzZSBvcHRf cHJveHkKICAgICB3aGVuIHRydWUKLSAgICAgIGZpbmRfcHJveHkgPSBsYW1i ZGEge3x1fCBweHkgPSB1LmZpbmRfcHJveHk7IHB4eSA/IFtweHksIG5pbCwg bmlsXSA6IG5pbH0KKyAgICAgIGZpbmRfcHJveHkgPSBsYW1iZGEge3x1fAor ICAgICAgICBpZiBweHkgPSB1LmZpbmRfcHJveHkKKyAgICAgICAgICAocHJv eHlfdXNlciwgcHJveHlfcGFzcykgPSBweHkudXNlcmluZm8udG9fcy5zcGxp dCgiOiIpCisgICAgICAgICAgW3B4eSwgcHJveHlfdXNlciwgcHJveHlfcGFz c10KKyAgICAgICAgZWxzZQorICAgICAgICAgIG5pbAorICAgICAgICBlbmQK KyAgICAgIH0KICAgICB3aGVuIG5pbCwgZmFsc2UKICAgICAgIGZpbmRfcHJv eHkgPSBsYW1iZGEge3x1fCBuaWx9CiAgICAgd2hlbiBTdHJpbmcKQEAgLTcz NiwxNyArNzQzLDE3IEBAIG1vZHVsZSBVUkkKICAgICAgICAgcHJveHlfdXJp ID0gRU5WW25hbWVdIHx8IEVOVltuYW1lLnVwY2FzZV0KICAgICAgIGVuZAog Ci0gICAgICBpZiBwcm94eV91cmkgJiYgc2VsZi5ob3N0bmFtZQotICAgICAg ICByZXF1aXJlICdzb2NrZXQnCi0gICAgICAgIGJlZ2luCi0gICAgICAgICAg YWRkciA9IElQU29ja2V0LmdldGFkZHJlc3Moc2VsZi5ob3N0bmFtZSkKLSAg ICAgICAgICBwcm94eV91cmkgPSBuaWwgaWYgL1xBMTI3XC58XEE6OjFcei8g PX4gYWRkcg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X2Zyb21fZW52CisgICAgd2l0aF9o dHRwIHt8c3J2LCBkciwgdXJsfAorICAgICAgbG9nID0gJycKKyAgICAgIHBy b3h5X3VzZXIgPSAndXNlcicKKyAgICAgIHByb3h5X3Bhc3MgPSAncGFzcycK KyAgICAgIHByb3h5ID0gV0VCcmljazo6SFRUUFByb3h5U2VydmVyLm5ldyh7 CisgICAgICAgIDpTZXJ2ZXJUeXBlID0+IFRocmVhZCwKKyAgICAgICAgOkxv Z2dlciA9PiBXRUJyaWNrOjpMb2cubmV3KE51bGxMb2cpLAorICAgICAgICA6 QWNjZXNzTG9nID0+IFtbTnVsbExvZywgIiJdXSwKKyAgICAgICAgOlByb3h5 QXV0aFByb2MgPT4gbGFtYmRhIHt8cmVxLCByZXN8CisgICAgICAgICAgbG9n IDw8IHJlcS5yZXF1ZXN0X2xpbmUKKyAgICAgICAgICBhdXRoID0gWyIje3By b3h5X3VzZXJ9OiN7cHJveHlfcGFzc30iXS5wYWNrKCdtJykuY2hvbXAKKyAg ICAgICAgICBpZiByZXFbIlByb3h5LUF1dGhvcml6YXRpb24iXSAhPSAiQmFz aWMgI3thdXRofSIKKyAgICAgICAgICAgIHJhaXNlIFdFQnJpY2s6OkhUVFBT dGF0dXM6OlByb3h5QXV0aGVudGljYXRpb25SZXF1aXJlZAorICAgICAgICAg IGVuZAorICAgICAgICB9LAorICAgICAgICA6QmluZEFkZHJlc3MgPT4gJzEy Ny4wLjAuMScsCisgICAgICAgIDpQb3J0ID0+IDB9KQorICAgICAgXywgcHJv eHlfcG9ydCwgXywgcHJveHlfaG9zdCA9IHByb3h5Lmxpc3RlbmVyc1swXS5h ZGRyCisgICAgICBwcm94eV91cmwgPSAiaHR0cDovLyN7cHJveHlfdXNlcn06 I3twcm94eV9wYXNzfUAje3Byb3h5X2hvc3R9OiN7cHJveHlfcG9ydH0iCisg ICAgICA6OkVOVlsnaHR0cF9wcm94eSddID0gcHJveHlfdXJsCisgICAgICBi ZWdpbgorICAgICAgICB0aCA9IHByb3h5LnN0YXJ0CisgICAgICAgIG9wZW4o IiN7ZHJ9L3Byb3h5IiwgInciKSB7fGZ8IGYgPDwgInByb3h5IiB9CisgICAg ICAgIG9wZW4oIiN7dXJsfS9wcm94eSIpIHt8ZnwKKyAgICAgICAgICBhc3Nl cnRfZXF1YWwoIjIwMCIsIGYuc3RhdHVzWzBdKQorICAgICAgICAgIGFzc2Vy dF9lcXVhbCgicHJveHkiLCBmLnJlYWQpCisgICAgICAgIH0KKyAgICAgICAg YXNzZXJ0X21hdGNoKC8je1JlZ2V4cC5xdW90ZSB1cmx9LywgbG9nKTsgbG9n LmNsZWFyCisgICAgICAgIGFzc2VydF9lcXVhbCgiIiwgbG9nKTsgbG9nLmNs ZWFyCisgICAgICBlbnN1cmUKKyAgICAgICAgcHJveHkuc2h1dGRvd24KKyAg ICAgIGVuZAorICAgIH0KKyAgZW5kCisKICAgZGVmIHRlc3RfcmVkaXJlY3QK ICAgICB3aXRoX2h0dHAge3xzcnYsIGRyLCB1cmx8CiAgICAgICBzcnYubW91 bnRfcHJvYygiL3IxLyIpIHt8cmVxLCByZXN8IHJlcy5zdGF0dXMgPSAzMDE7 IHJlc1sibG9jYXRpb24iXSA9ICIje3VybH0vcjIiOyByZXMuYm9keSA9ICJy MSIgfQo= --mimepart_4d537484a0807_59839fba0fa53bf--