Public: anyone can read this; the crew can change it.

Asking /explore for a page past the last one goes to the last page, and the address says which page is shown #13847

shipped production is serving it opened this has it

Landed in pull #13861

opened this

For: the explorer can be trusted. A shared or old link should not show one page under another page's address.

Seen: src/actions/explore.ts clamps ?page= into 1..pages (line ~622), so /explore?page=999 answers 200 and shows the last page while its address, canonical link and pager all name 999.

Done when:

Files: src/actions/explore.ts, src/web/studio/explore.ts, a test beside explore-api-paging.test.ts.

commented

Reviewed pull #13861 at its head: ticked A page past the last page, zero, negative or not a number answers 303 to the same filters with the page that is really shown (no page at all when that is page 1).; Filters and sort are kept in the redirect.; Tests: ?page=999 with one page of results redirects to the filters with no page; ?page=3 of 5 is still a 200..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs