I’m trying to set up a CGI AppleScript. It’s linked to a page being served by ˜Personal Web Sharing’.
I’m starting off with the Scripting Additions command: Handle CGI request, viz:
I’ve used some sample code from the Guidebooks which were part of System 8.6(!), modified for revisions to later Scripting Additions.
on handle CGI request ThisRequest ¬
searching for SearchString ¬
with posted data PostArguments ¬
using access method GETorPOST ¬
from address ThisClient ¬
from user UserName ¬
using password UserPassword ¬
with user info UserInformation ¬
from server ServerApplication ¬
via port ServerPort ¬
executing by URLScriptPath ¬
of content type MIMEType ¬
referred by ReferringPage ¬
from browser ClientBrowser ¬
using action CGIPath ¬
of action type ActionType ¬
from client IP address ClientAddress ¬
with full request FullRequest ¬
with connection ID ServerConnection ¬
from virtual host RootURL
-- process request
end handle CGI request
When I click on ˜Submit’, it displays an error page, with the following message:
“The requested method POST is not allowed for the URL /~david/cgi-bin/PGKAutoAd.scpt.”
Anyone any clues?!
Many TIA
David
Model: PowerBook G4
AppleScript: 1.9.1
Browser: Safari 85.8.1
Operating System: Mac OS X (10.2.x)