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

[REBOL] http 404 header

From: hallvard:ystad:helpinhand at: 2-Jan-2003 23:26

Hi I try to read a customized error message from a web page, and here's what I get:
>> trace/net on >> t: read http://helpinhand.com/nonexistant.html
URL Parse: none none helpinhand.com none none nonexistant.html Net-log: ["Opening tcp for" HTTP] connecting to: helpinhand.com Net-log: {GET /nonexistant.html HTTP/1.0 Accept: */* Connection: close User-Agent: REBOL 2.5.0.3.1 Host: helpinhand.com } Net-log: "HTTP/1.1 404 Not Found" ** User Error: Error. Target url: http://helpinhand.com/nonexistant.html coul d not be retrieved. Server response: HTTP/1.1 404 Not Found ** Near: t: read http://helpinhand.com/nonexistant.html Why do I not get the contents? After all, an HTML document _is_ written out! Is this bug fixed in the new betas? 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. Regards, ~H