[Bug] Path with dot doesn't work
See original GitHub issueReporting a bug?
Routes that contain a dot give the error Cannot GET [path]
. I’m upgrading from a much older version of react-static and this used to work.
Environment
$ npx envinfo --system --npmPackages react* --binaries --npmGlobalPackages react* --browsers
npx: installed 1 in 2.21s
System:
OS: Windows 10 10.0.18362
CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
Memory: 3.08 GB / 15.90 GB
Binaries:
Node: 10.16.3 - C:\Program Files\nodejs\node.EXE
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 44.18362.449.0
Internet Explorer: 11.0.18362.1
npmPackages:
react: ^16.9.0 => 16.12.0
react-dom: ^16.9.0 => 16.12.0
react-router: ^5.1.2 => 5.1.2
react-router-dom: ^5.1.2 => 5.1.2
react-static: ^7.2.0 => 7.2.3
react-static-plugin-react-router: ^7.2.3 => 7.2.3
react-static-plugin-sass: ^7.2.2 => 7.2.2
react-static-plugin-sitemap: ^7.2.0 => 7.2.3
react-static-plugin-source-filesystem: ^7.2.0 => 7.2.3
Steps to Reproduce the problem
- Create a basic template.
- Create a route such as
{
path: "foo.bar",
template: "src/pages/foobar"
}
- Run the site and try to go to the URL
/foo.bar
.
Expected Behavior
Dots in the URL should not cause an error.
Issue Analytics
- State:
- Created 4 years ago
- Comments:15 (15 by maintainers)
Top Results From Across the Web
Precise Technique Not Working With TR/DoT - Forum
Precise Technique keystone doesn't work with Toxic Rain's DoT as it should. --- Character: Shadow, Lvl28 ... Not a bug.
Read more >Bug #74061 :: Built-in server assumes path with dot is a file
Bug #64144: Process pending buildreqs during the API call that generates them. (pecl-caching-memcache/3); Don't use eregi since it was removed ...
Read more >[Bug] Folder name starting with a dot - TechNet - Microsoft
it is a bug because nowhere you can find a official document which say dot cannot be used for starting a folder names....
Read more >Relative Paths in file links don't work (incorrect handling of ...
Edit: a temporary workaround is to use the fact that “.” folder is consistently a relative file path and systematically resolves to “assets/path ......
Read more >Bug with directories ending with dots - 7-Zip - SourceForge
You can say that there is similar situation with long path (longer than 255 characters). But there is difference. Windows API doesn't work...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the info. Yes my site works when those lines are removed.
I’m using react-static for a documentation site. The URL paths I use have dots in them, and it really needs to stay like this. For example https://joshclose.github.io/CsvHelper/api/CsvHelper.Configuration.Attributes/ I would like a person to be able to type an API into the URL and it to come up.
This is currently running on an older version of react-static and I’m upgrading it. How did it used to work?