Hello All,

Could anyone explain me why exactly this code is called "bug fix"?

CgiEnvironment.cpp

#ifdef WIN32
  // Win32 bug fix by Peter Goedtkindt
  std::string https     = input->getenv("HTTPS");
  if(stringsAreEqual(https, "on"))
    fUsingHTTPS = true;
  else
    fUsingHTTPS = false;
#else
  fUsingHTTPS = (getenv("HTTPS") != 0);
#endif

Looks like a bug to me for anything that is NOT WIN32.

Take a look at
cgicc::CgiEnvironment::CgiEnvironment(CgiInput *input)
{
  ..........
  if(input == 0)
    readEnvironmentVariables(&local_input);
  else
    readEnvironmentVariables(input);

So, if your application does use an alternative IO stream (for example
- fastcgi) HTTPS is _always_ zero. It was tested under Linux and Unix
platforms under mod_fastcgi/apache environment.

I can't see any reason why we use getenv under UX platform not
worrying about the environment source?

-- 
www.rol.ru
Best regards,
 Igor                          mailto:[EMAIL PROTECTED]



_______________________________________________
help-cgicc mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-cgicc

Reply via email to