Browser Requests Object using GET or POST method, eg:
GET http://www.domain.com/some/file
Server 'maps' domain name to directory and looks for object, eg:
/home/sites/mysite/web/some/file
If found, server looks at extension.
Is it .htm or .html? It's a web page, so return appropriate content header and send the page to the browser.
Is it executable? Server checks against list of file types it's been told it can run. May be .cgi, may be .pl, may be both or more.
If it can run it, it then tries to run it.
".. the browser is retrieving
a file, not uploading one, which in my experience all-
ways requires an Id and password to log in first."
There are several things here I think you're confused about. I think you need to think about the protocols (the ways you are talking to the server). When you upload your web site files to the server, you are using FTP, and your account requires a login and password to upload and download files1.
With HTTP, when you are uploading a file, you are essentially sending a page request and attaching a block of data. The upload will only work if you have installed and configured the upload script by FTP1. - ie, you needed a login/password to tell the server you want
to use this script (that's the FTP part) and where you want it to dump the file that's uploaded - along with other security checks, like maximum file size (that's the Perl part).
You can force users to enter a username/password at upload time, but then you need to store passwords securely, or use .htaccess to control access to the pages - and that's another story.
Clear as mud now, eh? :-) From the way you are wording your questions, I think you need to learn quite a bit more before you can safely and securely let yourself loose on an upload script. At the very least, post the code you are going to use at some point and ask people to check whether it's secure or not.
But as I said before, read those pages on Amazon, and buy the book if you can afford it - and Learning Perl might be useful too.
hth
cLive ;-)
1 Yes, you can have anonymous FTP, but I'm trying to keep it simple for your example. And let's not get into SSH, Telnet etc... |