From: Jonathan S. <jn...@ge...> - 2004-08-10 09:11:05
|
On Tue, 2004-08-10 at 06:39, webmaster wrote: > Jonathan Stowe wrote: > > > On Mon, 2004-08-09 at 17:17, webmaster wrote: > > > >> webmaster wrote: > >> > >> 1. conditionally rewrite the url to the TFmail script if request > >> method is not post. > >> > >> 2. create error405.php > > > > It could be done by changing the single line: > > > > die 'request method must be "POST"'; > > > > to: > > > > print $treq->cgi()->header(-status => 405); > > exit; > > Thanks for the tip. I tried to implement it, but the results were a > little strange. The response from the server after the change was > "HTTP/1.1 405 OK". Only the numeric code has changed; the text message > is the same. That's a bit confusing, I think. > Yes, it is server dependent on what the string is - changing the numeric 405 to the quoted string '405 Request Method Not Allowed' will do the trick. > I also tested it by changing the code in the script to 403, and got > similar results: "HTTP/1.1 403 OK". > > > and creating the appropriate 405 error page if required. > > I've configured Apache to use 405.php as my error page for 405 errors, > but it is not used when I access TFmail with GET. > > > it would be better to be have a redirect configured in the .trc file > > - or indeed have TFmail.pl actually have another potential template > > that could be filled out from the GET request query string - that way > > it would be possible for people to create links to a form with some > > of the fields filled in or with a different config or other things > > that I can't think of at the moment. > > Those could indeed be very useful. > Well the latest development version of TFmail.pl in the CVS now has this functionality, we are aiming to make a release sometime this week. If you have access to CVS then you can get it using the instructions here: http://sourceforge.net/cvs/?group_id=39625 for some reason the "browse cvs repository" function isn't up to date. > > Anyway thanks for your input > > Sure. I hope I didn't just add more noise. |