[PerlMapToStorageHandler] Basic URI to File translation example

Robert Smith <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
PerlMapToStorageHandler

I would like to use the PerlMapToStorageHandler to translate a URI file request into a Filesystem file request. I have a couple functions to check and see if a file exists, and if not, then copy it from a remote server locally before allowing the request to go to the next phase.



Basic gist of what I want to handle in the PerlMapToStorageHandler is:

1) Client makes a request to server for /package_20.zip

2) My handler:
	gets the filename from the URI (no problem here)
	maps the filename to a real file on the file system
	checks to make sure the file exists

			File does not exist:
				copy file from another location to destination
				properly MapToStorage, and let the next phase take place
				


			File exists:
				properly MapToStorage, and let the next phase take place

3) Client receives file
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.