Hi everybody.

We found some interesting bug in FastCGI module for IIS7 during work on new HeliconTech product. If you set a server variable with empty value you get IIS crash! I think it's a very strange reaction. I wrote a simple IIS7 module to show the issue. So here is it:


I used this simple PHP code for the module testing:

echo "MyOwnServerVariable = ".$_SERVER[ 'MyOwnServerVariable' ];


I get crash when I request specified PHP-script:



But I get normal response when I set something in the server variable value:

// Set an empty server variable
http.Request.ServerVariables[ "MyOwnServerVariable" ] = "1";



I think it's a FastCGI bug. Actually Apache Web Server gives normal reaction in this situation. For example, if you write this directive:

SetEnv MyVar

Apache creates MyVar variable with empty value and puts it into server variables list, and this variable will be accessible from $_SERVER array in PHP.

0 comments: