| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
This pull request updates the SSR application to support non-ASCII routes and base hrefs by decoding URI components using decodeURIComponent with fallback handling. It also introduces comprehensive test coverage for non-ASCII paths. The review feedback suggests extracting a safeDecode helper to reduce code duplication and preserve variable immutability, as well as adding an afterEach hook in the tests to restore the manifest state and ensure proper test isolation.
Sorry, something went wrong.
Ensure that the request pathname is decoded using `decodeURIComponent` when resolving server asset paths in `AngularServerApp`. Previously, `buildServerAssetPathFromRequest` used the raw percent-encoded `pathname` from `new URL(request.url)` while prerendered assets were registered in the manifest under decoded names. Consequently, prerendered routes with non-ASCII or percent-encoded characters failed asset lookup and fell through to server-side rendering or 404. Closes angular#33966
|
This PR was merged into the repository. The changes were merged into the following branches: |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Checklist
Please check to confirm your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
AngularAppEngine / AngularServerApp resolves prerendered static assets using the raw percent-encoded pathname from new URL(request.url) without decoding. However, during the build, prerendered assets are registered in the manifest under their decoded names (e.g. /مقالات/دليل/index.html). For any prerendered route containing non-ASCII characters or percent-encoded characters, asset lookup fails and requests fall back to server-side rendering or 404.
Issue Number: Closes #33966
What is the new behavior?
The request pathname is decoded using decodeURIComponent in buildServerAssetPathFromRequest before looking up the asset in manifest.assets, ensuring requests for prerendered non-ASCII routes correctly match and serve their prerendered files.
Does this PR introduce a breaking change?
Other information