next.js
56d75a0b - Fix invalid HTML response for route-level RSC requests in deployment adapter (#91541)

Commit
15 hours ago
Fix invalid HTML response for route-level RSC requests in deployment adapter (#91541) In a deployed environment, `onCacheEntryV2` determines whether a postponed response is HTML-origin or RSC-origin by checking whether meta.url ends with `.rsc`. For some dynamic full-route RSC requests, Next was passing a URL with query params into onCacheEntry, for example: `/[tenant]/samples.rsc?nxtPtenant=tenant-x` Because that string does not end with .rsc, `onCacheEntryV2` misclassified the request as HTML and treated it as text/html instead of an RSC response. This PR normalizes the URL before passing it to `onCacheEntry`, so the callback receives the pathname rather than the full URL-with-query. --------- Co-authored-by: JJ Kasper <jj@jjsweb.site>
Author
Parents
Loading