When I do it, I get a different error:
- Code: Select all
Web Server Warning /web/refreshingimage: error loading image, reply from url server: 301
Web Server Error internal server error for request /web/refreshingimage from 192.168.111.109
code 301 is "Moved Permanently", which means that URL is no longer valid. The server will return the new URL, but it looks like Indigo is not following the redirect. To find the correct URL:
- Code: Select all
% curl -v "https://api.buienradar.nl/image/1.0/RadarMapNL?w=160&h=120"
* Trying 23.205.165.187:443...
* Connected to api.buienradar.nl (23.205.165.187) port 443 (#0)
* ALPN: offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/cert.pem
* CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256
* ALPN: server accepted h2
* Server certificate:
* subject: C=NL; L=Hilversum; O=RTL Nederland B.V.; CN=www.buienradar.nl
* start date: Sep 14 00:00:00 2023 GMT
* expire date: Sep 13 23:59:59 2024 GMT
* subjectAltName: host "api.buienradar.nl" matched cert's "*.buienradar.nl"
* issuer: C=US; O=DigiCert Inc; CN=DigiCert TLS RSA SHA256 2020 CA1
* SSL certificate verify ok.
* using HTTP/2
* h2 [:method: GET]
* h2 [:scheme: https]
* h2 [:authority: api.buienradar.nl]
* h2 [:path: /image/1.0/RadarMapNL?w=160&h=120]
* h2 [user-agent: curl/8.1.2]
* h2 [accept: */*]
* Using Stream ID: 1 (easy handle 0x14300a800)
> GET /image/1.0/RadarMapNL?w=160&h=120 HTTP/2
> Host: api.buienradar.nl
> User-Agent: curl/8.1.2
> Accept: */*
>
< HTTP/2 301
< content-length: 0
< location: https://image.buienradar.nl/2.0/image/animation/RadarMapRainNL?height=120&width=160&extension=png&renderBackground=True&renderBranding=False&renderText=True&history=3&forecast=3&skip=1
< cache-control: public, max-age=2493
< date: Thu, 30 Nov 2023 19:09:54 GMT
< access-control-max-age: 86400
< access-control-allow-credentials: false
< access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept
< access-control-allow-methods: GET,POST,PUT
< access-control-allow-origin: *
<
* Connection #0 to host api.buienradar.nl left intact
Trying with
https://image.buienradar.nl/2.0/image/animation/RadarMapRainNL?height=120&width=160 gives a 302 result, which is a normal redirect:
- Code: Select all
% curl - https://image.buienradar.nl/2.0/image/animation/RadarMapRainNL?height=120&width=160
[1] 35502
zsh: no matches found: https://image.buienradar.nl/2.0/image/animation/RadarMapRainNL?height=120
[1] + exit 1 curl -
jkeenan@Kraken ~ % curl -v "https://api.buienradar.nl/image/1.0/RadarMapNL?w=160&h=120"
jkeenan@Kraken ~ % curl -v "https://image.buienradar.nl/2.0/image/animation/RadarMapRainNL?height=120&width=160"
* Trying 104.89.170.180:443...
* Connected to image.buienradar.nl (104.89.170.180) port 443 (#0)
* ALPN: offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* CAfile: /etc/ssl/cert.pem
* CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256
* ALPN: server accepted h2
* Server certificate:
* subject: C=NL; L=Hilversum; O=RTL Nederland B.V.; CN=www.buienradar.nl
* start date: Sep 14 00:00:00 2023 GMT
* expire date: Sep 13 23:59:59 2024 GMT
* subjectAltName: host "image.buienradar.nl" matched cert's "*.buienradar.nl"
* issuer: C=US; O=DigiCert Inc; CN=DigiCert TLS RSA SHA256 2020 CA1
* SSL certificate verify ok.
* using HTTP/2
* h2 [:method: GET]
* h2 [:scheme: https]
* h2 [:authority: image.buienradar.nl]
* h2 [:path: /2.0/image/animation/RadarMapRainNL?height=120&width=160]
* h2 [user-agent: curl/8.1.2]
* h2 [accept: */*]
* Using Stream ID: 1 (easy handle 0x13e00c200)
> GET /2.0/image/animation/RadarMapRainNL?height=120&width=160 HTTP/2
> Host: image.buienradar.nl
> User-Agent: curl/8.1.2
> Accept: */*
>
< HTTP/2 302
< content-length: 0
< location: https://image-cdn.buienradar.nl/br-processing/image-api/RadarMapRainNL/Animation/202311301905__160x120_True_False_True_3_3_1_0_run202311301900.gif
< cache-control: max-age=160
< date: Thu, 30 Nov 2023 19:13:35 GMT
< strict-transport-security: max-age=15768000
< access-control-max-age: 86400
< access-control-allow-credentials: false
< access-control-allow-headers: Origin, X-Requested-With, Content-Type, Accept-Encoding
< access-control-allow-methods: GET,POST,PUT
< access-control-allow-origin: *
< set-cookie: akaalb_image_buienradar=~op=image_buienradar_ALB:tm-buienradar-image|~rv=97~m=tm-buienradar-image:0|~os=acd31c62b25089f0dcf410e10561d4bf~id=0221a6d276eca6632e173c19309fd9c7; path=/; HttpOnly; Secure; SameSite=None
<
* Connection #0 to host image.buienradar.nl left intact
Which gives this URL:
https://image-cdn.buienradar.nl/br-proc ... 301900.gifWhich works, but I don't know if it refreshes or not.
Matt or Jay will have to chime in on the redirect issues and if the server is supposed to handle them.