Skip to content
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

[Suggestion] Use "REQUEST_PATH" Instead of "SCRIPT_NAME" to Get Requested URI #9

Open
loloicci opened this issue May 22, 2020 · 2 comments

Comments

@loloicci
Copy link

I suggest using REQUEST_PATH instead of SCRIPT_NAME to get requested URI in parse_request.

https://github.com/rory/rust-cgi/blob/269b6680b84bc2645e89ec144f31bbc8b7a4bb2a/src/lib.rs#L235-L240

When the server uses mod_rewrite and rewrite requested URI:

  • If we use SCRIPT_NAME to get URI, the requested URI before rewriting is lost.
  • If we use REQUEST_PATH to get URI, gotten URI is the same one before rewriting.
@amandasaurus
Copy link
Owner

I'll have to read the CGI & HTTP to figure this out. I'd rather follow those specs. I don't know off the top of my head

@loloicci
Copy link
Author

Thank you @rory .
If you will decide not to change, could you discuss fix parse_request to return REQUEST_PATH in another way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants