|
|
Choosing A Webhost: |
RE: Mixed-case environment variables in Win32 don't get handled c orrectly: msg#00110apache.mod-perl.devel
Hi, Can't find any code explicitly in Apache which uppercases the key. I think that because mod_cgi calls "ap_os_create_privileged_process()" to run the perl interpreter, it ultimately calls the Win32 api CreateProcess(), which takes an environment block as a parameter. It must be within this API that conversion to uppercase is performed. So, you probably need to "emulate" this behaviour for Win32 since mod_perl doesn't call CreateProcess() - one of the main / major / only reasons for using mod_perl..... Hope that this might help. Cheers Steve -----Original Message----- From: Stas Bekman [mailto:stas@xxxxxxxxxx] Sent: 15 April 2003 10:41 Cc: Sparling, Steve (PS, GENS); dev@xxxxxxxxxxxxxxx Subject: Re: Mixed-case environment variables in Win32 don't get handled c orrectly Stas Bekman wrote: > steve.sparling@xxxxxxxxx wrote: > >> Thanks for your quick reply:- >> >> I don't have access to a diff with a "-u" option - :( > > > No problem. Your further explanation now makes things clear. > >> But the diff was showing the output from mod_perl versus mod_cgi. >> >> All the keys in UPPERCASE come from mod_cgi. >> >> DOWNGRADE_1_0="1" >> FORCE_RESPONSE_1_0="1" >> NOKEEPALIVE="1" >> SSL_SERVER_I_DN_EMAIL="steve.sparling@xxxxxxxxx" >> SSL_SERVER_S_DN_EMAIL="steve.sparling@xxxxxxxxx" >> SSL_UNCLEAN_SHUTDOWN="1" >> SYSTEMROOT="C:\WINDOWS" >> >> All the keys in MixedCase come from mod_perl. >> >> downgrade-1.0="" >> force-response-1.0="" >> nokeepalive="" >> SSL_SERVER_I_DN_Email="" >> SSL_SERVER_S_DN_Email="" >> ssl-unclean-shutdown="" >> SystemRoot="C:\WINDOWS" > > > mod_cgi calls ap_create_environment() which performs this mangling. I can see that ap_create_environment does s/\W/_/g: env[j] = apr_pstrcat(p, elts[i].key, "=", elts[i].val, NULL); whack = env[j]; if (apr_isdigit(*whack)) { *whack++ = '_'; } while (*whack != '=') { if (!apr_isalnum(*whack) && *whack != '_') { *whack = '_'; } ++whack; } ++j; But I can't see where it calls toupper to get the upcased vars (for those that you have listed). Can you trace which code does that? __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:stas@xxxxxxxxxx http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: [mp2] Win32 problems, Stas Bekman |
|---|---|
| Next by Date: | Re: rfc: allowing more than one mod_perl install - s/Apache2.pm/PREFIX+blib/, Geoffrey Young |
| Previous by Thread: | Re: Mixed-case environment variables in Win32 don't get handled c orrectly, Stas Bekman |
| Next by Thread: | [patch] Apache->server->pool, Geoffrey Young |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |