Availability of the SCRIPT_NAME variable is not guaranteed and it could also be available but empty. In fact, presence of any CGI variable in the environment should never be taken for granted, but after reading the spec I think the best bet would be GATEWAY_INTERFACE. A compliant server should set it no matter what.
Availability of the
SCRIPT_NAME
variable is not guaranteed and it could also be available but empty. In fact, presence of any CGI variable in the environment should never be taken for granted, but after reading the spec I think the best bet would beGATEWAY_INTERFACE
. A compliant server should set it no matter what.