[Xitami] gslgen & xitami & errors
Ewen McNeill
xitami@lists.xitami.org
Mon, 10 Dec 2001 21:14:46 +1300
In message <3BD82542.2090505@freesbee.fr>, Francis Turner writes:
>But there are times when I'd like to abort the file and return an error.
>Is it possible to return HTTP error codes? And if so is it also possible
>to redirect people using a 302 return?
In theory this should work, _providing_ the HTTP headers come at the
very beginning. The output of GSL is handled basically the same way as
a CGI's output in Xitami, and that means that some reparsing of headers
is done, so you should be able to output them _at_the_beginning_ and
have it work.
Of course this means that you've got to figure out early on in your GSL
script (before outputting anything) if you want to give up and return an
error/redirect.
The solution you found (of using a meta-refresh) will work, but it's not
quite as tidy as a proper redirect for some things.
Ewen
--
Ewen McNeill, Technical Consultant, iMatix Corporation www.imatix.com