From a9ab4ed7d9de6a02c17cade32df0ae1dc632673a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20J=C3=A4genstedt?= Date: Wed, 20 Dec 2023 12:02:51 +0100 Subject: [PATCH] Update /multipage/websockets redirect to work with/without slash --- debian/marquee/nginx/sites/html.spec.whatwg.org.conf | 6 +++--- test/redirects.mjs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/marquee/nginx/sites/html.spec.whatwg.org.conf b/debian/marquee/nginx/sites/html.spec.whatwg.org.conf index af2a724..4cdb45e 100644 --- a/debian/marquee/nginx/sites/html.spec.whatwg.org.conf +++ b/debian/marquee/nginx/sites/html.spec.whatwg.org.conf @@ -26,9 +26,6 @@ server { location = /multipage/web-sockets.html { return 301 https://websockets.spec.whatwg.org/; } - location = /multipage/websockets { - return 301 https://websockets.spec.whatwg.org/; - } location = /multipage/window-object.html { return 301 /multipage/nav-history-apis.html; } @@ -96,6 +93,9 @@ server { location = /multipage/link-fixup.js { return 301 /link-fixup.js; } + location ~ ^/multipage/websockets(/(.*))?$ { + return 301 https://websockets.spec.whatwg.org/$2; + } location = /demos/offline/clock/clock.html { return 301 /demos/offline/clock/clock2.html; } diff --git a/test/redirects.mjs b/test/redirects.mjs index 095c874..bd62534 100644 --- a/test/redirects.mjs +++ b/test/redirects.mjs @@ -84,7 +84,7 @@ const HTTPS_TESTS = [ ['https://html.spec.whatwg.org/multipage/scripting-1.html', 301, 'https://html.spec.whatwg.org/multipage/scripting.html'], ['https://html.spec.whatwg.org/multipage/section-sql.html', 410], ['https://html.spec.whatwg.org/multipage/tabular-data.html', 301, 'https://html.spec.whatwg.org/multipage/tables.html'], - ['https://html.spec.whatwg.org/multipage/websockets/', 301, 'https://websockets.spec.whatwg.org/'], + ['https://html.spec.whatwg.org/multipage/websockets', 301, 'https://websockets.spec.whatwg.org/', 'keep'], ['https://javascript.spec.whatwg.org/', 302, 'https://github.com/tc39/ecma262/labels/web%20reality', 'drop'], ['https://lists.whatwg.org/htdig.cgi', 301, 'https://lists.whatwg.org/pipermail/', 'keep'], ['https://lists.whatwg.org/listinfo.cgi', 301, 'https://lists.whatwg.org/'],