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

Check the usage of $ENV{SCRIPT_NAME} #17

Closed
bschmalhofer opened this issue May 12, 2020 · 4 comments
Closed

Check the usage of $ENV{SCRIPT_NAME} #17

bschmalhofer opened this issue May 12, 2020 · 4 comments
Milestone

Comments

@bschmalhofer
Copy link
Contributor

$ENV{SCRIPT_NAME} is used in several places in the code base. My impression is that these usages are not standard compliant, as SCRIPT_NAME can depend on the webserver setup. In any case it would be nice if $ENV{SCRIPT_NAME} would be inspected in a single central location, e.g. in Kernel::System::Web::Request

@bschmalhofer
Copy link
Contributor Author

It would be nice to use $ENV{SCRIPT_NAME} . $ENV{PATH_INFO} This would allow handler functions or scripts that handle all of 'otobo'.

@bschmalhofer
Copy link
Contributor Author

Using $ENV{SCRIPT_NAME} . $ENV{PATH_INFO}is not really necessary as having separate handles for e.b. otobo/installer.pl and otobo/index.pl is not really a problem. But getting the info from the ParamObject, instead of the environment, is a nice feature.

bschmalhofer added a commit to bschmalhofer/otobo that referenced this issue Jun 6, 2020
Use $ParamObject->ScriptName() instead.
@bschmalhofer
Copy link
Contributor Author

Provided a PR that gets rid of $ENV{SCRIPT_NAME}. The only remaining usage is in ./Kernel/Output/HTML/Templates/Standard/Test.tt . I have no idea where this template is used.

svenoe added a commit that referenced this issue Jun 8, 2020
Issue #17: refrain from using $ENV{SCRIPT_NAME}
@bschmalhofer
Copy link
Contributor Author

PR is merged

@bschmalhofer bschmalhofer added this to the OTOBO 10.0 milestone Jul 22, 2020
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

No branches or pull requests

1 participant