Page MenuHomePhabricator

https://ores.wikimedia.org redirects me to HTTP when I don't include a trailing slash
Closed, ResolvedPublic

Description

km@km-tp ~> curl "https://ores.wikimedia.org/v2/scores/enwiki/wp10?revids=722364056"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>Redirecting...</title>
<h1>Redirecting...</h1>
<p>You should be redirected automatically to target URL: <a href="http://ores.wikimedia.org/v2/scores/enwiki/wp10/?revids=722364056">http://ores.wikimedia.org/v2/scores/enwiki/wp10/?revids=722364056</a>.  If not click the link.⏎ 
km@km-tp ~> curl -I "https://ores.wikimedia.org/v2/scores/enwiki/wp10?revids=722364056"
HTTP/1.1 301 MOVED PERMANENTLY
Date: Sat, 25 Jun 2016 20:20:34 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Location: http://ores.wikimedia.org/v2/scores/enwiki/wp10/?revids=722364056
Access-Control-Allow-Origin: *
Vary: Accept-Encoding
X-Varnish: 310021315, 841282794, 864081779
Via: 1.1 varnish-v4, 1.1 varnish-v4, 1.1 varnish-v4
Age: 0
X-Cache: cp1058 miss, cp3008 miss, cp3010 miss
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Set-Cookie: WMF-Last-Access=25-Jun-2016;Path=/;HttpOnly;secure;Expires=Wed, 27 Jul 2016 12:00:00 GMT
X-Analytics: https=1;nocookies=1
X-Client-IP: 88.147.31.142

Then you hit the HTTP->HTTPS redirect and eventually get what you want.

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald Transcript
amir@amir-Lenovo-ideapad-300-15IBR:~/workspace/numerical methods$ curl "https://ores.wikimedia.org/v2/scores/enwiki/wp10?revids=722364056"
{
  "scores": {
    "enwiki": {
      "wp10": {
        "scores": {
          "722364056": {
            "prediction": "Stub",
            "probability": {
              "B": 0.0030014265479200762,
              "C": 0.002040316809060808,
              "FA": 0.0,
              "GA": 0.0,
              "Start": 0.06759152314932852,
              "Stub": 0.9273667334936906
            }
          }
        },
        "version": "0.3.1"
      }
    }
  }
}