[feature request] disable decode_param for path routing
See original GitHub issueI have some special urls thats get mapped to local files like image50%.png.
app.get('/open/:path(*)', (req, res) => {})
But it doesn’t work because express automaticly calls decode_param.
It throws Failed to decode param
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Feature Request: ECMP Path Monitoring - LIVEcommunity
Hi @Aewald785 ,. If you are not using static routes, you probably are using BGP with the default route only, the ISP should...
Read more >LED Disable Feature Request - Peplink | Pepwave - Forum
Using the MAX-HD2-DOM-M- 1LTE router. It is currently mounted using the provided mounting bracket See Page 21 on the pepwave-max-user-manual. I ...
Read more >Release notes for JBoss Community at SourceForge.net
Community driven projects featuring the latest innovations for cutting edge apps. Our flagship project JBoss AS is the leading Open Source,…
Read more >Fastly: Route n% of traffic based on a path param
So I have to randomize the requests around my '${specialPathParams}' which actually looks like randombool with seeded param:.
Read more >Go Fiber by Examples: Delving into built-in functions
Disable keep-alive connections. ... Note: Route paths, combined with a request method, define the endpoints at which requests can be made.
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 FreeTop 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
Top GitHub Comments
Hi @lublak by invalid, I am referring to what Express.js considers invalid. The reason you are getting the error is indeed because the URL is invalid according to Express.js, as it expects parameters to be URL-encoded and if the JavaScript function to decode URL-encoded strings,
decodeURIComplement
throws as invalid, then Express.js will bubble up that error. I did not make any statements regarding how Firefox works, of course, though my understanding is it will send whatever the user types in, regardless of what the web server is expecting. My guess, though, is that Firefox will still turn spaces into%20
, so if you disable the param decoding, a URL like/open/foo bar.jpg
will end up asfoo%20bar.jpg
on the server when you have decoding disabled, even if the user typed in a literal space, so turning it off probably has down sides.@dougwilson for me it works fine 😃 thanks for your tip. But i decided only support some %.
urlPath.replace(/%([&$%.-_ #?=*/]|$)/g, '%25$1')