Actually, they aren't NT as in 'Windows NT', they are totally proprietary (Northern Telecom had the NT trademark before WinNT was invented...).
Bottom-line, this may be Win32-specific because it is IIS and PerlIS that are involved (both being WinNT), but it is generic problem in the sense that they seem to only pass on standard/known HTTP headers into the ENV (rather than all headers regardless of their key name). I don't understand why PerlIS doesn't work the same as Perl CGI on this. Hey ho!
 
My assumption is that with CGI it is IIS that strips the headers, puts them into user environment vars, and then calls perl.exe with only the body of the HTTP as STDIN. In PerlIS, if taps into ISAPI, so it must be doing this first part (stripping the headers) in the DLL code, and again only providing the body in STDIN and then faking the calls to ENV. But in the parsing of the header and faking ENV, it's obviously doing a poor job...

Cheers,
Jonathan

-----Original Message-----
From: JJ [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 17, 2000 9:54 AM
To: Crowther, Jonathan [ORCH:9T03-M:EXCH]
Cc: '[EMAIL PROTECTED]'
Subject: Re: Beginning to try PerlIS

I'm not sure what the problem is.  These are NT generated headers and I know so little about them.
JJ

Jonathan Crowther wrote:

 

Initially, things were looking good. However, I came across a stumbling block. In our environment, 3 special HTTP header key/values are set, and with CGI perl they appear in the @ENV :

  HTTP_NT_ACCESS_AUTH_TYPE
  HTTP_NT_ACCESS_USER
  HTTP_NT_ACCESS_USER_DATA

With PerlIS, even when I explicitly refer to these ENV, they return blank (undef, I guess)
I even tried the CGI module's $query->http() function, and it also cannot get at this HTTP header information.

I am starting to guess that IIS is stripping the HTTP header, and is not parsing all keys: only the ones it knows (i.e. standard headers, not general parsing). Is that true?

Is there any way to get IIS/ISAPI/PerlIS to provide custom headers through to the .plx script?

Cheers,
Jonathan

-----Original Message-----
From: JJ [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 14, 2000 11:31 AM
To: Crowther, Jonathan [ORCH:9T03-M:EXCH]
Cc: '[EMAIL PROTECTED]'
Subject: Re: Beginning to try PerlIS

As I understand it, you must "explicitly" reference an %ENV key to find it's value when using PerlIS.  Unlike normal (non-ISAPI Perl), you cannot loop on all keys (an "impliciit" reference) and expect to see their values.

The loop I used to use is:
    foreach $var (sort keys %ENV) {
        print($var, "=", $ENV{$var});
    }
But that only printed out those environment variables previously referenced explicitly.  Try explicitly referencing the keys below to verify.  For example,

    print("REMOTE_ADDR=", $ENV{"REMOTE_ADDR"});
I'm told this was done to increase execution speed of PerlIS.  Go figure.
JJ
Jonathan Crowther wrote:

I wanted to try speeding up my Perl without too much effort, and so started looking into PerlIS (ISAPI). I did a quick test of a very simple test Perl by renaming it from *.pl to *.plx.

Although the Perl executed correctly, it displayed the %ENV (as it should), but I found that the %ENV is much shorter than with regular CGI Perl. Specifically, the following were missing:

HTTP_CONNECTION
HTTP_COOKIE
HTTP_HOST
HTTP_USER_AGENT
PATH_INFO
PATH_TRANSLATED
REMOTE_ADDR
REMOTE_HOST
SCRIPT_NAME
SERVER_NAME
SERVER_PORT
SERVER_PORT_SECURE
My other scripts use most of these $ENV{} values, so I don't see how PerlIS will ever work for me, unless there some alternative ways to get to such information.

Can anyone confirm or deny this observation, or have suggestions?
Cheers,
Jonathan

Reply via email to