Hi,
is it possible to get the JSON list of mirrors https://archlinuxarm.org/data/mirrors/list publicly?
If I try to make a POST request on it via curl, I get an error:
$this->bbcode_second_pass_code('', '
$ curl -vX POST https://archlinuxarm.org/data/mirrors/list
* Trying 50.116.36.110...
* TCP_NODELAY set
* Connected to archlinuxarm.org (50.116.36.110) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: none
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* NPN, negotiated HTTP2 (h2)
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Next protocol (67):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: CN=archlinuxarm.org
* start date: Feb 6 02:33:06 2019 GMT
* expire date: May 7 02:33:06 2019 GMT
* subjectAltName: host "archlinuxarm.org" matched cert's "archlinuxarm.org"
* issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x5613e0b25e50)
> POST /data/mirrors/list HTTP/2
> Host: archlinuxarm.org
> User-Agent: curl/7.64.0
> Accept: */*
>
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
< HTTP/2 404
< server: nginx/1.10.3
< date: Mon, 04 Mar 2019 11:02:24 GMT
< content-type: text/html
< content-length: 506
< last-modified: Sat, 26 Sep 2015 02:21:14 GMT
<
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Error 404</title>
<link rel="stylesheet" href="/public/css/error.css" />
<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
</head>
<body>
<h1>Error 404</h1>
<div id="content">
<h2>Page Not Found</h2><p>Sorry, this is the void.</p>
</div>
<div id="footer">
Powered by <a href="http://perldancer.org/">Dancer</a>.
</div>
</body>
</html>
* Connection #0 to host archlinuxarm.org left intact
')
I suspect the website expects some cookies according to the developer console of chromium or does only allow same-origin requests.
Background is that I've written a reflector-like¹ mirror list optimizer and would like to extend it to also be able to filter ArchLInux ARM's mirror list.
_____
1) https://github.com/conqp/speculum