httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jlwpc1" <>
Subject Re: [PATCH] Cleaning mod_cgi.c
Date Tue, 11 Sep 2001 21:45:54 GMT
From: "William A. Rowe, Jr." <>

> > Why is the above "odd or bad'?
> Just the syntax - args trailing %* (known to unix folk as $*), quoted %1 command, etc.
> Quite different from the Unix #!script-cmd :)
> > Have you used cscript.exe for Apache CGI yet?
> Of course - the simplest way (if you don't trust the registry association for
> security - which I don't) 

Well you are definitely using the wrong OS then! :)

Why are people changing stuff on your system?

>is to create a .wsh file in order to embed the shebang,
> since #! would be an error to .vb or .js script files ...

No No No!   A little story below.

It is .vbs for Windows Script Host not .vb ( Visual Basic).

One wants to learn JScript, because JScript is a big part of .NET.  VBScript goes away - gone
and there will only be VB in .NET.
But what the hell - VBScript.exe runs now and in Apache fine!
If it gets the job done!

Now remember when Windows Script Host ( WSH )
came out it was for browser side only.  Those 
days are gone now.  WSH today is in services,
web servers, programs, and command line usage
(and ??secrets?? ).

If you use your below .wsh file, then there will be
a lot of files stored on the server. For each file 
called this way MUST have a .wsh and .script file
both with the same name.  Example: 


Makes for a lot of extra files not needed.

Instead of using .wsh files ( unless needed for extra
info - stored in the .wsh file, maybe), just set the server's
default for Windows Script Host  (shown below).

Anyway .wsf ( TestOne.wsf ) replace the
TestOne.wsh file and the TestOne.js file 
and with FULL xml "ways", but is over kill
for most everyday Apache Windows users. 
But Apache developers should be a doing WSF
type files for them!

> -- script.wsh -------------------
> #!CScript.exe "%1"
> [ScriptFile]
> Path=c:\web\cgi-bin\script.vb
> [Options]
> Timeout=10
> DisplayLogo=0
> BatchMode=1
> -- end script.wsh ---------------
> So yes - shebangs work even with cscript ;)

It does? 

The .wsh file above is a text file for checking
on WSH usage in the file. Cost time to make 
and time to run, then the file named the same
is ran.

What runs if the so called shebangs line is removed
in your .wsh file?

Does the CScript.exe or the .wsh file pay any attention
to the so called shebangs line? 

What if you put Perl.exe or php.exe there in the so
called shebangs line in the .wsh file - what runs?

I think here is the only shebangs line that works
for Windows Script Host.
#!C:/whatever/CScript.exe TestOne.js

But this is not needed (but works without Perl)!

Changing the Windows Script Host default.

Since it is for a server the simplest is this story.

Windows Host Script defaults to WScript.exe
for those Windows windows.  So for command
line default (like server usage) set the default
to CScript.exe and the timeout and the batch
mode and no logo on the same line (only needs
to be done once).  

CScript.exe //Nologo //T:0 //H:CScript.exe //B //S

Later if you want those Windows windows to pop up
with Windows Script Host call WScript.exe instead
of CScript.exe on your server command line (not 
through the server though - for this use WinHTTP).
Or write a JS file to change defaults back and forth.

WinHTTP (usable in services) is the server version 
of xmlHTTTP (not service usable) which uses WinInet 
in browsers .  But WinHTTP was designed to be used 
in services, but only Windows 2000 and up!  Microsoft 
unlike Apache has stopped ALL Win9x Internet server 
usage ways but not internet clients - like increased Unicode 
access for Win9x programs (over 400 functions)!

So anyway then can the CScript %1  go away?

What happens now that the Windows Script Host
default as been changed to CScript.exe and using
ScriptInterpreterSource and you go to:






Or all the other .names that Windows Script Host runs?

How is the speed compared to PHP, PERL, JSP and etc?

My hint is learn xml and use .wsf files written in JScript.

Also try WinHttp (second beta) for Apache development 
tools or mods!  And yes, Windows Script Host 5.6 ( GA ) 
is now out, the betas are over and yes some bugs are 
still there to match the Window XP release (and you only
have to match Apache)!

Also the day you said you would not use IE because of 
headers "stuff" - I thought why not display them all or 
change them before being sent to the server. 

So I wrote a .hta file that reads IE headers/meta
sent to the server and those sent back and the file 
is displayed in text, html or unsigned bytes.  All 
written in JScript. 

I'm still having troubles with reading IE META types
sent or modified before I send them, ( I'm not a 
browser/http expert ) but I'm a researchin' it!

By the way, in the above Header/Meta reader,
my built in timer (most likely half assed ) says
that my JScript print env var file on the Apache
1.3.20 is four times faster then the Perl
on the Apache.  The JS file is a lot larger and lots
more typing too.

Do some tests and let us all know what you think!


View raw message