Unable to handle redirect, unsupported scheme
zhanxw opened this issue · comments
zhanxw commented
I notice that HTTP (used by cabal) does not support redirect.
I have set up $proxy_http correctly. The university proxy does not require authentication.
It seems the HTTP redirect still failed. Is there a way to solve this problem?
> cabal update --verbose=3 Downloading the latest package list from hackage.haskell.org Sending: GET http://hackage.haskell.org/packages/archive/00-index.tar.gz HTTP/1.1 User-Agent: cabal-install/1.20.0.2 (linux; x86_64) Host: hackage.haskell.org proxy uri host: proxy.swmed.edu, port: :3128 Creating new connection to proxy.swmed.edu:3128 Received: HTTP/1.1 302 authenticationrequired Via: 1.1 129.112.115.41 (McAfee Web Gateway 7.4.2.1.0.17593) Date: Tue, 29 Jul 2014 14:33:01 GMT Location: https://m-proxy2.swmed.edu:10000/mwg-internal/de5fs23hu73ds/plugin?target=Auth&reason=Auth&ClientID=851966280&ttl=43200&url=aHR0cDovL2hhY2thZ2UuaGFza2VsbC5vcmcvcGFja2FnZXMvYXJjaGl2ZS8wMC1pbmRleC50YXIuZ3o=&rnd=1406644381 Content-Type: text/html Cache-Control: no-cache Content-Length: 3678 Proxy-Connection: Keep-Alive 302 - redirect Warning: http error: Unable to handle redirect, unsupported scheme: https://m-proxy2.swmed.edu:10000/mwg-internal/de5fs23hu73ds/plugin?target=Auth&reason=Auth&ClientID=851966280&ttl=43200&url=aHR0cDovL2hhY2thZ2UuaGFza2VsbC5vcmcvcGFja2FnZXMvYXJjaGl2ZS8wMC1pbmRleC50YXIuZ3o=&rnd=1406644381 cabal: Failed to download http://hackage.haskell.org/packages/archive/00-index.tar.gz : ErrorMisc "Error HTTP code: 302"
Ganesh Sittampalam commented
This is because the redirect is to HTTPS, which is not supported: see #17