[Catalyst] How to decline file from extension
Chisel Wright
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?
I added
$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
Connection: close
Date: Thu, 21 Dec 2006 22:26:46 GMT
Content-Length: 9
Content-Type: text/html; charset=utf-8
Status: 404
X-Catalyst: 5.7006
--
Chisel Wright
e: chisel at herlpacker.co.uk
w: http://www.herlpacker.co.uk/
The following sentence is true.
The previous sentence is false.
More information about the Catalyst
mailing list