help-cgicc
[Top][All Lists]
Advanced

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

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


From: PeterGo
Subject: Re: [help-cgicc] Win32 bug fix by Peter Goedtkindt is a bug by itself?
Date: Sat, 26 Jan 2008 08:09:42 -0800 (PST)

Look at the history of that file....
Before the bugfix there was only the line:
fUsingHTTPS = (getenv("HTTPS") != 0);
and no #ifdef WIN32's.

As Peter Goedtkindt found out this was buggy on windows, but had no *nix
platform
for testing the fix he submitted correction code only for windows and left
*nix code unaltered.
He did not change any code for UX !

Peter ;-)


Igor-7 wrote:
> 
> 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
> 
> 
> 
> _______________________________________________
> help-cgicc mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-cgicc
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Win32-bug-fix-by-Peter-Goedtkindt-is-a-bug-by-itself--tp8750172p15109410.html
Sent from the cgicc - General mailing list archive at Nabble.com.





reply via email to

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