creativecommons / creativecommons.org

Legacy legal code translations and general support issues
MIT License
155 stars 201 forks source link

HTTP license URLs return 521 instead of 301 #1097

Closed TimidRobot closed 4 years ago

TimidRobot commented 4 years ago

Thank you @kiden for reporting this issue!!

Describe the bug

HTTP license URLs return 521 instead of 301. This appears to be true for all HTTP license URLs (deed, legalcode, RDF).

The issue is obscured by modern browsers, which assume/fallback to HTTPS.

HTTP license URL example (using HTTPie – command line HTTP client):

http -h http://creativecommons.org/licenses/by/4.0/deed.en
HTTP/1.1 521 
CF-RAY: 58170e3feda6e4f6-LAX
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection: keep-alive
Content-Type: text/html; charset=UTF-8
Date: Thu, 09 Apr 2020 20:42:37 GMT
Expires: Thu, 01 Jan 1970 00:00:01 GMT
Pragma: no-cache
Server: cloudflare
Set-Cookie: cf_ob_info=521:58170e3feda6e4f6:LAX; path=/; expires=Thu, 09-Apr-20 20:43:07 GMT
Set-Cookie: cf_use_ob=80; path=/; expires=Thu, 09-Apr-20 20:43:07 GMT
Transfer-Encoding: chunked
X-Frame-Options: SAMEORIGIN

HTTPS license URL example:

http -h https://creativecommons.org/licenses/by/4.0/deed.en
HTTP/1.1 200 OK
CF-Cache-Status: EXPIRED
CF-RAY: 581718d89fc0770a-LAX
Cache-Control: max-age=1800
Connection: keep-alive
Content-Encoding: gzip
Content-Type: text/html; charset=UTF-8
Date: Thu, 09 Apr 2020 20:49:52 GMT
Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
Server: cloudflare
Set-Cookie: __cfduid=d0af5e5986cfd9578488f2c7989249bd51586465391; expires=Sat, 09-May-20 20:49:51 GMT; path=/; domain=.creativecommons.org; HttpOnly; SameSite=Lax
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Transfer-Encoding: chunked
Vary: Accept-Encoding
Via: 1.1 varnish (Varnish/5.0)
X-Varnish: 292826392 29324403

Expected behavior

HTTP URLs should redirect to HTTPS.

Additional context

TimidRobot commented 4 years ago

This was resolved by new infrastructure (Migration to new creativecommons.org infrastructure · Issue #1094).

TimidRobot commented 4 years ago

Thank you @kiden for reporting this issue!!