----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, November 04, 1999 1:02 AM Subject: [REBOL] http server... Re:(9) > Kat, > > I did some more experimenting. Here's what's returned by a VERY simplistic > web server (written in PERL): > > HTTP/1.0 404 Object Not Found > Content-type: text/html > > <BODY><h1>HTTP/1.0 404 Object Not Found</h1></BODY></html> > > This would seem to support my last suggestion that these two lines (at > least) in a header might be what's necessary. Of course, you want "HTTP/1.0 > 200 OK", rather than the error code returned in this example :) Ok, i read http://www.w3.org/Protocols/rfc2616/rfc2616 i could make little sense of it, but i wrote a header server (made-up values) : alias makeheader { write -c [ $1 $+ .htm ] HTTP/1.1 200 OK write [ $1 $+ .htm ] Date: Thu, 04 Nov 1999 08:51:31 GMT write [ $1 $+ .htm ] Server: mIRC write [ $1 $+ .htm ] Content-Location: %httpd.dirlist. [ $+ [ %sockname ] ] write [ $1 $+ .htm ] Content-Type: text/html write [ $1 $+ .htm ] If-Modified-Since: Sat, 29 Oct 1994 19:43:31 GMT write [ $1 $+ .htm ] $crlf } and this happens: >> print read http://localhost/untitled.txt connecting to: localhost ** Script Error: Invalid argument: Make. ** Where: make integer! value >> print read http://localhost/ connecting to: localhost <html> <head> <TITLE> dir listing </TITLE> </head> <BODY BGCOLOR="#FFFFFF"><H4><CENTER> File listing for Root </H4> (escape) >> So the next question is,, why is the header ok for the root dir listing, and not ok for getting a file? Kat
