Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: http 404 header

From: andreas:bolka:gmx at: 3-Jan-2003 20:29

Thursday, January 2, 2003, 11:26:10 PM, Hallvard wrote:
> Oh, and here's a second question: > When I try to redirect from a rebol cgi script (using http headers), > I am allowed to write the Location: header, but not the first > header, the "HTTP/1.1 200 OK" thing. Or "HTTP/1.1 302 Moved". My web > server then reports an error. So I suspect a double header is > written out in that case, meaning that rebol automatically writes > out a 200 message (I may very well be mistaken here). Am I right in > suspecting so? Can this be prevented? In some cases, I'd like to > control much of this myself.
A quick look at the CGI spec solves this mystery - the "Status" header allows you to set the HTTP response status code from within a CGI environment: http-redir: func [url] [ prin rejoin [ "Status: 302 Moved temporarily" newline "Location: " url newline newline ] quit ] -- Best regards, Andreas mailto:[andreas--bolka--gmx--net]