help-cgicc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[help-cgicc] Win32 bug fix by Peter Goedtkindt is a bug by itself?


From: Igor
Subject: [help-cgicc] Win32 bug fix by Peter Goedtkindt is a bug by itself?
Date: Thu, 1 Feb 2007 18:28:13 +0300

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:address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]