-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
IIS server returns HTTP 500 errors outside of FastCGI loop #6411
Comments
I have a feeling we'll need an alternative to msCGIWriteError() for this use case, something more independent of any initialization or setup. |
A couple of things that didn't work:
I think what we probably want to happen is either:
I'm interested how this appears on other web servers - does setting |
I can confirm the 500 error with FastCGI using Vagrant. Nothing in the logs other than the standard "End of script before headers: mapserv.fcgi". The setup is:
The CGI returns the config file not found error as expected. |
@geographika, if I change the configuration error handling to do some FastCGI related initialization before writing the error then I don't see a 500 error and get the expected error message. @rouault, wondering if you think this is reasonable...
|
@sdlime - I can confirm with this update on IIS/FastCGI I get the following error with an invalid path, rather than a generic HTTP 500 error:
And when missing the environ variable
This will make it much easier for users to setup/diagnose the issue. |
Thing is that I don't think we should be outputting the config file name/path. |
A generic |
@geographika, think we can close this? |
As noted in #6303 - Windows IIS (and possibly other servers) return HTTP 500 errors if the program exits, rather than returning an HTTP response with an error. This makes it hard to diagnose the underlying issue - for example the path to the config file could be incorrect, or the environment variable is missing.
Examples:
MapServer/mapserv.c
Lines 144 to 148 in 17d8fa9
MapServer/mapserv.c
Lines 156 to 158 in b55b128
Attempts to exit within the
FCGI_Accept() >= 0
loop worked once and then failed.Possible solution is to simply keep going to
goto end_request;
The text was updated successfully, but these errors were encountered: