Skip to content

fake gateway: redirect a site directory, and serve a directory under /_decdn/ as its index.html #16

Closed

Description

@yigitdot

The fake gateway has no directory redirect at all. The real gateway (after decdn/decdn#2818) answers as follows, for a bundle <h> with docs/index.html and no docs entry, on a site origin:

  • A site's own path: GET /docs answers 302 Location: docs/ (no query); GET /docs/ serves docs/index.html.
  • Under /_decdn/: GET /_decdn/<h>/docs answers 302 Location: docs/, and the redirect keeps the request's query: GET /_decdn/<h>/docs?ns=7 answers 302 Location: docs/?ns=7. GET /_decdn/<h>/docs/ (and …/docs/?ns=7) serves docs/index.html.
  • HEAD /_decdn/<h>/docs/ redirects to docs/index.html on the bundle's site, at no pull.

To do:

  • Add the directory redirect and the trailing-/ → index.html mapping to the fake, for a site's own paths and under /_decdn/, with the query kept on the /_decdn/ redirect.
  • Add a directory entry to the contract fixture bundle and a contract test for the cases above, then move .github/sdk-python.sha in decdn/decdn to the commit that adds it.

Activity

  1. yigitdot commented on Nov 23, 2026

    @yigitdot
    ContributorAuthor

    decdn/decdn#2941 changed two details of the behavior described above:

    • A site's own-path directory redirect keeps the query: GET /docs?tab=2 answers 302 Location: docs/?tab=2 (HEAD alike), not a query-free docs/.
    • A navigation (Sec-Fetch-Mode: navigate) or HEAD of /_decdn/<h>/docs/ redirects to the directory on the bundle's site, https://<site>/docs/, not to …/docs/index.html.
  2. added
    bug
    on Nov 23, 2026
  3. added 2 commits that reference this issue on Nov 23, 2026
    2cb1c64
    64d79bd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions