Problem: In
equestHandler.ts line 281 (added in v3.9.0 for Next.js 15.4+),
eq.url is reconstructed from a RoutingResult whose query values were decoded via
ew URLSearchParams() in convertToQuery(), but convertToQueryString() does not re-encode them. This causes double-decoding downstream when the URL is re-parsed — %26 (encoded &) becomes bare &, which then acts as a query parameter separator.
Solution: Either (a) use
ew URL(event.url).search to preserve original percent-encoding instead of the decode/re-encode round-trip, or (b) re-encode values in convertToQueryString() using encodeURIComponent() so the query string is valid when re-parsed.
Use case: Applications with special characters in query params (e.g., a course search app with department code I&C SCI, where %26 gets double-decoded to bare &, truncating tRPC httpBatchLink GET requests). Works on OpenNext 3.6.6, breaks on 3.9.0+.
Problem: In
equestHandler.ts line 281 (added in v3.9.0 for Next.js 15.4+),
eq.url is reconstructed from a RoutingResult whose query values were decoded via
ew URLSearchParams() in convertToQuery(), but convertToQueryString() does not re-encode them. This causes double-decoding downstream when the URL is re-parsed — %26 (encoded &) becomes bare &, which then acts as a query parameter separator.
Solution: Either (a) use
ew URL(event.url).search to preserve original percent-encoding instead of the decode/re-encode round-trip, or (b) re-encode values in convertToQueryString() using encodeURIComponent() so the query string is valid when re-parsed.
Use case: Applications with special characters in query params (e.g., a course search app with department code I&C SCI, where %26 gets double-decoded to bare &, truncating tRPC httpBatchLink GET requests). Works on OpenNext 3.6.6, breaks on 3.9.0+.