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

Process non-empty environment variables in get_cgi_filename #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kapouer
Copy link

@kapouer kapouer commented May 29, 2013

Easier to debug when nginx sends empty variables.
Allows unsetting SCRIPT_FILENAME like in :

include /etc/nginx/fastcgi_params;
fastcgi_param   SCRIPT_FILENAME         "";
fastcgi_param   SCRIPT_NAME             $fastcgi_script_name;
fastcgi_param   DOCUMENT_ROOT           $document_root;

* easier to debug when nginx sends empty variables.
Allows unsetting SCRIPT_FILENAME like in :
```
include /etc/nginx/fastcgi_params;
fastcgi_param   SCRIPT_FILENAME         "";
fastcgi_param   SCRIPT_NAME             $fastcgi_script_name;
fastcgi_param   DOCUMENT_ROOT           $document_root;
```
@Lekensteyn
Copy link
Contributor

You can also use *p instead of strlen(p) > 0 to check whether a string is empty or not.

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 this pull request may close these issues.

2 participants