Re: ACGI form parsing in OSX?
Re: ACGI form parsing in OSX?
- Subject: Re: ACGI form parsing in OSX?
- From: James Sentman <email@hidden>
- Date: Fri, 1 Feb 2002 18:04:00 -0500
You misunderstood. I do have this thing as a Perl script and it
works just fine. What I want to do is to use my Apache server to
trigger a cgi handler inside an ASS app. I thought this is what your
acgi bridge does. I know that Apple already provides this bridge for
their own server software, but not for Apache. The reason I haven't
downloaded your solution is that it doesn't work right out of the
box (user needs to install it) and that you have announced it as
shareware. Since I can do what I want with the Perl script, there
just isn't enough incentive for me to get your ACGI app. I also
understand that Apple is about to give us the Apache-ACGI bridge
anyway.
Hi All,
Yes, that's what the program does. Basically just translates between
the stdin/stdout streams from Apache to the apple event format used
by Mac web servers in the past. I've gotten a lot of feedback on it
in the last couple of days. I'm excited to hear that Apple is going
to give us their acgi enabler. I hadn't heard that. I'll just have to
add value to my own program for you then;)
It is a separate program that you need to install, thats true. There
isn't any way around this at the moment, except perhaps if apple
includes the acgi enabler as the default install with the next
version of OSX. The install process is trivial though, drag it into
the CGI-Executables folder and launch it. Then restart web sharing.
It could be made into a faceless background application so the user
wouldn't be looking at the icon in the dock all the time though.
I haven't exactly announced the program as shareware. I haven't
announced it anywhere but here yet, but I don't think most people
would have a problem with it being shareware in the traditional
sense. No limitations to annoy you and if you use it and it has value
then pay a small fee to guarantee it's continued development.
My point about the URL decoding was that in the absence of regular
expressions in AS, a do shell script with regular expressions would
be handy. So I've played a bit in the Terminal, but can't find the
correct way of getting this to work. The closest I've come is the
following:
'just a test' | perl s|%([a-fA-F0-9]{2})|chr(hex($1))|ge
--> badly placed ()'s.
I really don't know where the problem is, since this thing works
just fine in my Perl script and the parens look fine to me.
I see from more recent posts that this is now working via the do
shell command. I'm going to experiment with extending the handle CGI
request over the weekend to pass you a list of lists of the data
already decoded while keeping all the other data intact. So what you
would be getting is a list like this:
{{ "name", "value"}, { "name", "value}, ...}
Is this the structure that most people would expect? Or would
something else be better? Having the program return it to you along
with the other data is going to be much faster than spawning off a
bunch of shells and launching perl each time. Especially if there are
more than a couple of form elements.
Thanks,
James
--
_________________________________________________________________________
James Sentman <email@hidden>
http://www.sentman.com
Enterprise server monitoring with:
http://whistleblower.sentman.com/