You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-user@tcl.apache.org by David McTavish <dm...@sandvine.com> on 2003/11/13 22:14:13 UTC

websh and returning HTTP errors

Is it possible to respond to a request with an HTTP error (as per the RFC
ftp://ftp.rfc-editor.org/in-notes/rfc2616.txt)
In particular, I'd like to make use of internal errors such as 400 "Bad
Request" and 404 "Not Found".

I was hoping that this would be possible via:
web::response -set Response-Header "HTTP/1.1 404 Not Found\n"

But this doesn't seem to work as expected.


thx,
d.

Re: websh and returning HTTP errors

Posted by Ronnie Brunner <ro...@netcetera.ch>.
> I was hoping that this would be possible via:
> web::response -set Response-Header "HTTP/1.1 404 Not Found\n"

  web::response -httpresponse "HTTP/1.0 404 Not Found"

is what you are looking for...

Ronnie
----------------------------------------------------------------------
Ronnie Brunner                             ronnie.brunner@netcetera.ch
Netcetera AG, 8040 Zuerich   phone +41 1 247 79 79 fax +41 1 247 70 75