I faced the same issue on Windows , cpan was throwing the same error messages .
I would recommend following things when configuring http_proxy setting .
1. Never modify the CPAN/config.pm module instead modify the local copy present in C:/Users/user_name/APPData/local.
2. Configure Environment variable http_proxy properly.
Key : http_proxy
value : http://proxy_address:port
3. Even after setting the proxy env if it doesnt work try deleting the local copy of config.pm , it might have been miss configured.
in reply to Re^11: LWP - 500 Internal Error
in thread LWP - 500 Internal Error