Problem w/ CGI and PWS
Problem w/ CGI and PWS
- Subject: Problem w/ CGI and PWS
- From: "Michael T. Davis" <email@hidden>
- Date: Fri, 27 Apr 2001 13:44:00 -0400 (EDT)
I have started having a problem with a CGI I threw together a while
back, used in conjunction with Personal Web Sharing (PWS). I believe the
trouble started with an upgrade from Mac OS 9.0.4 to 9.1 or (more probable)
with an upgrade to AppleScript 1.6. The idea behind the CGI is to notify me
whenever someone accesses an image on the Web server. I have dubbed the CGI
"Sounder". Documentation on usage is included as comments within the code.
Here's a URL to the source code:
http://www.er6.eng.ohio-state.edu/~davism/Sounder.txt
Save the resulting page as text, then open it in Script Editor. Certain
characters won't look right within the browser (e.g. not-equal-to sign, line
continuation, etc.), but should properly translate once the text file is
opened in Script Editor (or any editor which properly displays these special
characters).
The behavior I'm currently encountering is that, when invoked via
PWS, the CGI isn't handled as a CGI, but is called by PWS as if it was run.
If I replace "quit" in the run handler with "set checkTime to current date",
then visit a page that invokes Sounder within the prescribed idle time (five
minutes), the CGI handler _is_ called when I (re)visit a page which includes
an invocation to Sounder. That is, when I visit a page which includes the
following:
<IMG SRC="
http://my-server/cgi-bin/Sounder.acgi$/image.jpg?Hey" ...>
rather than invoking Sounder to play the "Hey" sound, then redirecting to
http://my-server/image.jpg, it's just running Sounder; if I then reload the
same page (from the server, not from cache), Sounder is invoked as I would
expect, and fires off the "Hey" sound before redirecting to the actual image.
What gives? Am I doing something that's not supported, which was
recently broken with the upgrade of the OS and/or AS, or is something within
the system broken?
Thanks,
Mike
--
Michael T. Davis | Systems Specialist: ChE,MSE
E-mail: email@hidden | Departmental Networking/Computing
-or- email@hidden | The Ohio State University
http://www.er6.eng.ohio-state.edu/~davism/ | 197 Watts, (614) 292-6928