Skip to content

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

Description

@loloicci

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions