Skip to content
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.

Can't fetch export.json with curl? #37

Closed
job opened this issue Jun 4, 2018 · 4 comments
Closed

Can't fetch export.json with curl? #37

job opened this issue Jun 4, 2018 · 4 comments

Comments

@job
Copy link
Contributor

job commented Jun 4, 2018

For some reason this fails: curl -vs https://rpki.meerval.net/api/export.json

*   Trying 188.166.25.112...
* TCP_NODELAY set
* Connected to rpki.meerval.net (188.166.25.112) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/cert.pem
  CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
} [234 bytes data]
* TLSv1.2 (IN), TLS handshake, Server hello (2):
{ [104 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [2738 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [300 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [37 bytes data]
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
} [1 bytes data]
* TLSv1.2 (OUT), TLS handshake, Finished (20):
} [16 bytes data]
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
{ [1 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: CN=rpki.meerval.net
*  start date: Jun  4 07:18:11 2018 GMT
*  expire date: Sep  2 07:18:11 2018 GMT
*  subjectAltName: host "rpki.meerval.net" matched cert's "rpki.meerval.net"
*  issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
*  SSL certificate verify ok.
> GET /api/export.json HTTP/1.1
> Host: rpki.meerval.net
> User-Agent: curl/7.60.0
> Accept: */*
> 
< HTTP/1.1 406 
< Server: nginx/1.10.3
< Date: Mon, 04 Jun 2018 08:37:42 GMT
< Content-Type: application/vnd.net.ripe.rpki.validator.v3+json;charset=UTF-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< 
{ [189 bytes data]
* Connection #0 to host rpki.meerval.net left intact
{
  "timestamp" : "2018-06-04 08:37:42",
  "status" : 406,
  "error" : "Not Acceptable",
  "message" : "Could not find acceptable representation",
  "path" : "/api/export.json"
}
@timbru
Copy link

timbru commented Jun 4, 2018

I believe that this should work.

As a quick work-around however, you can get this to work if you specify the accept header for curl:

curl -vs -H "Accept: text/json" https://rpki.meerval.net/api/export.json

@job
Copy link
Contributor Author

job commented Jun 4, 2018 via email

@timbru
Copy link

timbru commented Jun 4, 2018 via email

@job
Copy link
Contributor Author

job commented Jun 4, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants