opencode
opencode copied to clipboard
File references containing % characters cause 400 Bad Request URI Error
I noticed this error when working on an application that uses tanstack router where you make slug routes with the % symbol.
Pretty sure the issue occurs in the file reference processing pipeline since when decodeURIComponent(url.pathname) is called, % is considered an escape character and needs to be followed by some hex characters.
This issue might be a duplicate of existing issues. Please check:
- #787: Both issues describe the same problem with percent-encoded characters in file paths causing 400 Bad Request URI errors due to improper handling of URL decoding with decodeURIComponent
Feel free to ignore if none of these address your specific case.