-
-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
urlParsed
removes trailing slash
#1629
Comments
I would be happy to create a PR for this. Probably this lines need to be changed: vike/vike/node/runtime/renderPage/handlePageContextRequestUrl.ts Lines 25 to 36 in 6dedbfb
Are there unit tests for this? Where would you add a unit test? |
I agree and PR welcome 👍 I also agree that'd be good to add some Vitest test for it and create a file |
Inside |
Yes, that's an issue: there is no way to know whether
That would be a brittle solution as it would fail for |
Ah, actually more natural: |
Where would the trailing slash |
See `vike/shared/getPageContextRequestUrl.ts`
…On Thu, May 2, 2024 at 10:45 AM Robin ***@***.***> wrote:
Where would the trailing slash /en/index.pageContext.json/ being added?
—
Reply to this email directly, view it on GitHub
<#1629 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHVQRRO7N33WP4LLZXSEWDZAH4MHAVCNFSM6AAAAABHDBD3OOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBZHEZDCMRRGM>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Closing as it doesn't seem fixable, see #1632 (comment). @openscript Let me know whether this is a blocker for you. Otherwise I'll move on and focus on other priorities. |
Thank you @brillout. Even though a nice way to handle this, I'm happy that we collaborated. It's not a blocker as I can handle it case by case in my implementation. |
Description
When the
urlOriginal
is/en/index.pageContext.json?asd=asd
and in the address bar is displayed/en/?asd=asd
theurlPathname
is/en
. When theurlOriginal
is/en/?asd=asd
theurlPathname
is/en/
.This behavior is not influenced by
disableUrlNormalization: true
.In my opinion the
urlPathname
should be/en/
when theurlOriginal
is/en/index.pageContext.json?asd=asd
.The text was updated successfully, but these errors were encountered: