[Catalyst] How to decline file from extension
chisel at herlpacker.co.uk
Thu Dec 21 22:27:09 GMT 2006
On Thu, Dec 21, 2006 at 06:58:28PM +0100, Jean-Michel Caricand wrote:
> Now, when I ask for the URL http://localhost/my_component.mas
> Apache sends an error "NOT FOUND".
> I just want to simulate this behavior in Catalyst without Apache.
What's wrong with changing 403 to 404 in my previous suggestion?
$c->response->body( 'Not Found' );
to the sub and it seemed to to the right thing:
$ curl -i http://zombie:3000/my_component.mas
HTTP/1.0 404 Not Found
Date: Thu, 21 Dec 2006 22:26:46 GMT
Content-Type: text/html; charset=utf-8
e: chisel at herlpacker.co.uk
The following sentence is true.
The previous sentence is false.
More information about the Catalyst