Please fix 301 redirects in API - server changes causing issues since 22 June
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ratings and Reviews server |
Fix Released
|
High
|
Colin Watson |
Bug Description
Hello,
As of ~ 21 hours ago I have been seeing many hundreds of error reports concerning fetching reviews from the rnr-server API. The earliest instance appears to be Thursday, June 22, 2017 22:45 UTC.
A typical request has been http://
It would appear that the intention of recent server changes was to redirect http calls to https calls. Unfortunately
http://
I can only assume that the intention was that e.g. http://
Would you be able to fix this?
I will issue an update to my application to call the https url directly (and be a bit more robust with unexpected responses), but reality is that it is going to take months before the update trickles out to most users. Until they install the update everyone will be hit with error messages popping up which is not ideal, so fixing the server redirects would be of great help.
Thanks.
TEST CASE (which doesn't redirect properly):
$ curl -Lv http://
* Trying 162.213.33.12...
* TCP_NODELAY set
* Connected to reviews.ubuntu.com (162.213.33.12) port 80 (#0)
> GET /reviews/
> Host: reviews.ubuntu.com
> User-Agent: curl/7.52.1
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Date: Fri, 23 Jun 2017 17:02:55 GMT
< Server: Apache/2.4.7 (Ubuntu)
< Location: https:/
< Content-Length: 318
< Content-Type: text/html; charset=iso-8859-1
<
* Ignoring the response-body
* Curl_http_done: called premature == 0
* Connection #0 to host reviews.ubuntu.com left intact
* Issue another request to this URL: 'https:/
* Trying 162.213.33.12...
* TCP_NODELAY set
* Connected to reviews.ubuntu.com (162.213.33.12) port 443 (#1)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:
* successfully set certificate verify locations:
* CAfile: /etc/ssl/
CApath: /etc/ssl/certs
* TLSv1.2 (OUT), TLS header, Certificate Status (22):
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* 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, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: C=GB; ST=London; L=London; O=Canonical Group Ltd; OU=IS; CN=reviews.
* start date: Jun 15 00:00:00 2017 GMT
* expire date: Jun 20 12:00:00 2018 GMT
* subjectAltName: host "reviews.
* issuer: C=US; O=DigiCert Inc; CN=DigiCert SHA2 Secure Server CA
* SSL certificate verify ok.
> GET / HTTP/1.1
> Host: reviews.ubuntu.com
> User-Agent: curl/7.52.1
> Accept: */*
>
< HTTP/1.1 301 MOVED PERMANENTLY
< Date: Fri, 23 Jun 2017 17:02:55 GMT
< Server: gunicorn/19.3.0
< Content-Length: 0
< Content-Type: text/html; charset=utf-8
< Location: https:/
< X-Bzr-Revision-
< Strict-
<
* Curl_http_done: called premature == 0
* Connection #1 to host reviews.ubuntu.com left intact
* Issue another request to this URL: 'https:/
* Found bundle for host reviews.ubuntu.com: 0x55c319d16140 [can pipeline]
* Re-using existing connection! (#1) with host reviews.ubuntu.com
* Connected to reviews.ubuntu.com (162.213.33.12) port 443 (#1)
> GET /reviews/ HTTP/1.1
> Host: reviews.ubuntu.com
> User-Agent: curl/7.52.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Fri, 23 Jun 2017 17:02:55 GMT
< Server: gunicorn/19.3.0
< Content-Length: 9429
< Expires: Fri, 23 Jun 2017 17:06:14 GMT
< Last-Modified: Fri, 23 Jun 2017 17:01:14 GMT
< Cache-Control: max-age=300
< Content-Type: text/html; charset=utf-8
< X-Bzr-Revision-
< Vary: Accept-Encoding
< Strict-
<
<!DOCTYPE (... HTML PAGE...)</html>
* Curl_http_done: called premature == 0
* Connection #1 to host reviews.ubuntu.com left intact
Changed in rnr-server: | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Colin Watson (cjwatson) |
The HTTP → HTTPS redirects are fixed now.
$ curl -is http:// reviews. ubuntu. com/reviews/ api/1.0/ reviews/ filter/ en/any/ any/any/ gimp/page/ 1/newest/ | grep ^Location: /reviews. ubuntu. com/reviews/ api/1.0/ reviews/ filter/ en/any/ any/any/ gimp/page/ 1/newest/
Location: https:/