thaljef / Pinto

Curate your own repository of Perl modules
https://metacpan.org/module/Pinto::Manual
66 stars 49 forks source link

Pinto installer script broken by github change to githubusercontent #180

Closed Deracination closed 9 years ago

Deracination commented 9 years ago

The install script fetches cpanm from raw.github.com, but the url needs to be changed to raw.githubusercontent.com

CPANM_URL="https://raw.githubusercontent.com/thaljef/Pinto/master/etc/cpanm"
thaljef commented 9 years ago

I agree the URL should be changed, but GitHub just redirects, so I'm not sure how this actually "breaks" the installer. Can you demonstrate for me?

Deracination commented 9 years ago

When I was testing it yesterday there were no redirects and cpanm downloaded as an html error page from github. Maybe a transient github problem then?

Deracination commented 9 years ago

Something is maybe broken on github. The install url getpinto fails in curl and wget (tested from several locations, so this isn't a local network issue). It works fine in a browser.

curl --version
curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
curl -Lv http://getpinto.stratopan.com

* About to connect() to getpinto.stratopan.com port 80 (#0)
*   Trying 198.58.102.57... connected
* Connected to getpinto.stratopan.com (198.58.102.57) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: getpinto.stratopan.com
> Accept: */*
>
< HTTP/1.1 302 Found
< Date: Sun, 25 Jan 2015 23:23:00 GMT
< Server: Apache/2.2.22 (Debian)
< Location: https://raw.github.com/thaljef/Pinto/master/etc/install.sh
< Vary: Accept-Encoding
< Content-Length: 330
< Content-Type: text/html; charset=iso-8859-1
<
* Ignoring the response-body
* Connection #0 to host getpinto.stratopan.com left intact
* Issue another request to this URL: 'https://raw.github.com/thaljef/Pinto/master/etc/install.sh'
* About to connect() to raw.github.com port 443 (#1)
*   Trying 103.245.222.133... connected
* Connected to raw.github.com (103.245.222.133) port 443 (#1)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_RSA_WITH_AES_128_CBC_SHA
* Server certificate:
*       subject: CN=www.github.com,O="Fastly, Inc.",L=San Francisco,ST=California,C=US
*       start date: Feb 25 00:00:00 2014 GMT
*       expire date: Mar 02 12:00:00 2015 GMT
*       common name: www.github.com
*       issuer: CN=DigiCert High Assurance CA-3,OU=www.digicert.com,O=DigiCert Inc,C=US
> GET /thaljef/Pinto/master/etc/install.sh HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: raw.github.com
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Date: Sun, 25 Jan 2015 23:23:02 GMT
< Server: Apache
< Location: https://raw.githubusercontent.com/thaljef/Pinto/master/etc/install.sh
< Content-Length: 0
< Accept-Ranges: bytes
< Via: 1.1 varnish
< Age: 0
< X-Served-By: cache-akl6421-AKL
< X-Cache: MISS
< X-Cache-Hits: 0
< Vary: Accept-Encoding
<
* Connection #1 to host raw.github.com left intact
* Issue another request to this URL: 'https://raw.githubusercontent.com/thaljef/Pinto/master/etc/install.sh'
* About to connect() to raw.githubusercontent.com port 443 (#2)
*   Trying 103.245.222.133... connected
* Connected to raw.githubusercontent.com (103.245.222.133) port 443 (#2)
*   CAfile: /etc/pki/tls/certs/ca-bundle.crt
  CApath: none
* SSL connection using TLS_RSA_WITH_AES_128_CBC_SHA
* Server certificate:
*       subject: CN=www.github.com,O="Fastly, Inc.",L=San Francisco,ST=California,C=US
*       start date: Feb 25 00:00:00 2014 GMT
*       expire date: Mar 02 12:00:00 2015 GMT
*       common name: www.github.com
*       issuer: CN=DigiCert High Assurance CA-3,OU=www.digicert.com,O=DigiCert Inc,C=US
> GET /thaljef/Pinto/master/etc/install.sh HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.15.3 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: raw.githubusercontent.com
> Accept: */*
>
< HTTP/1.1 400 Bad Request
< Date: Sun, 25 Jan 2015 23:23:02 GMT
< Server: Apache
< Content-Length: 279
< Connection: close
< Content-Type: text/html; charset=iso-8859-1
<
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>400 Bad Request</title>
</head><body>
<h1>Bad Request</h1>
<p>Your browser sent a request that this server could not understand.<br />
Host name provided via SNI and via HTTP are different</p>
</body></html>
* Closing connection #2
* Closing connection #0
* Closing connection #1
thaljef commented 9 years ago

@tartansandal fixed this in 148b8950