Hi,

namotco wrote:
> Of course.  I'm trying to prevent people from accessing my code that  
> I give the Mason site to.
>
> Can anyone provide some more insight?
>   

I'm not sure if this works and in fact, I have a question myself about 
this :-), so if anyone has any suggestions, I'd like to hear, too.  At 
the moment, I added this into my Apache2 httpd.conf:

<FilesMatch "(\.mhtml|\.mtxt|\.mpl|dhandler|autohandler|syshandler)$">
  SetHandler perl-script
  PerlHandler Apache2::Const::NOT_FOUND
</FilesMatch>

So, any direct requests for these file extensions will return a 404 
error.  I also made html files such as index.html which are a few lines 
long and simply call another component.  That is, index.html can call 
form.mhtml, but a direct request for form.mhtml won't work.  And if 
Mason is set up correctly to compile the html file, a request for this 
html file will result in html code and no Mason code.

Is this what you mean?

I only have one problem and if anyone else can tell me what is wrong, 
please let me know...  In my forms, I send a post request to say 
"process.html".  I'd like to give it a mhtml extension, etc. to prevent 
someone from accessing it directly, but then the post request doesn't 
work.  i.e., my desire to prevent access to .mhtml files has bitten me 
when it comes to forms...thus, the form has to have an html extension.  
Since HTTP is stateless and a request to index.html is no different to 
process.html with POST data, I see no way around this one other than the 
fact that process.html will have its Mason code compiled.

Sorry...a bit off topic from your original problem!

Ray



-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to