-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
req.path
docs don't specify if it's the encoded or decoded path
#1281
Comments
I will have to take a look to verify, but it shoupd be whatever the client sent, as there is no encoding or decoding being done on it as far as I know. |
Yep, just double-checked and there is no normalization being done, which is the default expectation. Nothing is specified there as Express doesn't do anything to it (encoding or decoding). |
I just tested and came to the same conclusion. I still think this would be good to document. According to https://masteringjs.io/tutorials/express/req Express does parse the query string parameters, but does not parse the body The fact that some things are parsed and others are not would be impossible to figure out from the docs today |
Unfortunately we don't control that website. The default expectation is that things are not altered from what they were sent as unless specified otherwise. |
Should we at least update the docs for https://expressjs.com/en/api.html#req.query then? Because my understanding from the other website is that the query is parsed, but the Express deviates from the "default" expectation without documenting it (unless you're saying the other website is incorrect. It would be best if I could read the Express docs to figure out what to expect rather than relying on unstated assumptions and third-party websites) |
To be clear:
I took a look at
The value of |
https://expressjs.com/en/api.html#req.path
The text was updated successfully, but these errors were encountered: