Skip to content

fix: resolve relative discovery redirects against the request URL - #281

Merged
natelindev merged 1 commit into
natelindev:mainfrom
bensynapse:fix-relative-discovery-redirects
Sep 30, 2026
Merged

natelindev merged 1 commit into
natelindev:mainfrom
bensynapse:fix-relative-discovery-redirects

Conversation

@bensynapse

Copy link
Copy Markdown
Contributor

I run Live Tennis API.

Discovery resolves relative Location headers against serverUrl, even though the request goes to /.well-known/caldav or /.well-known/carddav.
For serverUrl=https://example.com/calendars/user1/, a Location: ../dav/ response incorrectly produces /calendars/dav/ instead of /dav/.

Resolve redirects against the discovery request URL. This follows RFC 9110.

The regressions cover relative paths and query strings through PROPFIND and GET fallback. Both client APIs have regressions.
All eight new cases fail before the fix.

Validated on Node 22 with pnpm test (306 tests), pnpm typecheck, pnpm lint and pnpm build.
Live provider tests were not run.

@vercel

vercel Bot commented Sep 28, 2026

Copy link
Copy Markdown

@bensynapse is attempting to deploy a commit to the llldar's projects Team on Vercel.

A member of the Team first needs to authorize it.

@natelindev
natelindev merged commit c035f3e into natelindev:main Sep 30, 2026
7 of 8 checks passed
@natelindev natelindev mentioned this pull request Oct 1, 2026

This branch was successfully deployed

1 active deployment
Production — d9118a80 Deployed Sep 30, 2026 by bensynapse via automated-test (24) #1394
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants