Open sylvaingi opened 1 year ago
This issue has been labeled as a bug since it was created using the 🚨 Bug Report Template.
Hi there, thank you so much for the report!
Following our Maintenance Process, we will review your bug report and get back to you next Wednesday. To ensure a smooth review of your issue and avoid unnecessary delays, please make sure your issue includes the following:
package.json
file.If you have identified the cause of the bug described in your report and know how to fix it, you're more than welcome to open a pull request address it. Check out our quick start guide for a simple contribution process.
If you think your issue is a question (not a bug) and would like quicker support, please close this issue and forward it to an appropriate section on our community forum: https://community.prismic.io
- The Prismic Open-Source Team
Hey @sylvaingi, thanks for the bug report. I haven't had a chance to look at this yet, but I just wanted to let you know it isn't being ignored. 🙂
Versions
@prismicio/next
: 0.1.9next
: 12.3.4node
: 16.18.1Reproduction
page
, with anuid
field and the following route resolver:page
document with an uid containing unicode characters, likeтест
.What is expected?
The
тест
page
document is previewed.What is actually happening?
An error page is displayed, and Next.js logs the following error:
After some research the error is located within
redirectToPreviewURL
, with the underlyingres.redirect
call. This function tries to send a response with theLocation
header set with the redirection URL, but it seems that Node doesn't allow raw unicode characters in HTTP headers.Forcing each path segment in the to be URL encoded solves the issue, this is my workaround: