Skip to content

Instantly share code, notes, and snippets.

@larsgw
Created May 27, 2017 15:39
Show Gist options
  • Save larsgw/d848e2a25d354975867a912a2056d282 to your computer and use it in GitHub Desktop.
Save larsgw/d848e2a25d354975867a912a2056d282 to your computer and use it in GitHub Desktop.
cURL https doi.org -> http data crossref.org
$ curl -vILH 'Accept: application/vnd.citationstyles.csl+json' https://doi.org/10.1126/science.169.3946.635
* Hostname was NOT found in DNS cache
* Trying 63.123.152.248...
* Connected to doi.org (63.123.152.248) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* Server certificate:
* subject: OU=Domain Control Validated; OU=PositiveSSL Multi-Domain; CN=doi.org
* start date: 2016-05-11 00:00:00 GMT
* expire date: 2019-06-17 23:59:59 GMT
* subjectAltName: doi.org matched
* issuer: C=FR; ST=Paris; L=Paris; O=Gandi; CN=Gandi Standard SSL CA 2
* SSL certificate verify ok.
> HEAD /10.1126/science.169.3946.635 HTTP/1.1
> User-Agent: curl/7.38.0
> Host: doi.org
> Accept: application/vnd.citationstyles.csl+json
>
< HTTP/1.1 303 See Other
HTTP/1.1 303 See Other
* Server Apache-Coyote/1.1 is not blacklisted
< Server: Apache-Coyote/1.1
Server: Apache-Coyote/1.1
< Vary: Accept
Vary: Accept
< Location: http://data.crossref.org/10.1126%2Fscience.169.3946.635
Location: http://data.crossref.org/10.1126%2Fscience.169.3946.635
< Expires: Sat, 27 May 2017 15:30:58 GMT
Expires: Sat, 27 May 2017 15:30:58 GMT
< Content-Type: text/html;charset=utf-8
Content-Type: text/html;charset=utf-8
< Content-Length: 195
Content-Length: 195
< Date: Sat, 27 May 2017 14:38:59 GMT
Date: Sat, 27 May 2017 14:38:59 GMT
<
* Connection #0 to host doi.org left intact
* Issue another request to this URL: 'http://data.crossref.org/10.1126%2Fscience.169.3946.635'
* Disables POST, goes with HEAD
* Hostname was NOT found in DNS cache
* Trying 208.254.38.85...
* Connected to data.crossref.org (208.254.38.85) port 80 (#1)
> HEAD /10.1126%2Fscience.169.3946.635 HTTP/1.1
> User-Agent: curl/7.38.0
> Host: data.crossref.org
> Accept: application/vnd.citationstyles.csl+json
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Access-Control-Allow-Origin: *
Access-Control-Allow-Origin: *
< Access-Control-Allow-Headers: X-Requested-With, Accept, Accept-Encoding, Accept-Charset, Accept-Language, Accept-Ranges, Cache-Control
Access-Control-Allow-Headers: X-Requested-With, Accept, Accept-Encoding, Accept-Charset, Accept-Language, Accept-Ranges, Cache-Control
< Access-Control-Expose-Headers: Link
Access-Control-Expose-Headers: Link
< Link: <http://dx.doi.org/10.1126/science.169.3946.635>; rel="canonical"
Link: <http://dx.doi.org/10.1126/science.169.3946.635>; rel="canonical"
< Content-Type: application/vnd.citationstyles.csl+json
Content-Type: application/vnd.citationstyles.csl+json
< Content-Length: 0
Content-Length: 0
* Server http-kit is not blacklisted
< Server: http-kit
Server: http-kit
< Date: Sat, 27 May 2017 14:39:00 GMT
Date: Sat, 27 May 2017 14:39:00 GMT
< X-Rate-Limit-Limit: 50
X-Rate-Limit-Limit: 50
< X-Rate-Limit-Interval: 1s
X-Rate-Limit-Interval: 1s
< Connection: close
Connection: close
<
* Closing connection 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment