Cheng> http bind /* get {
Cheng> return "Content-type: text/html\n\n"
Cheng> return "/home/is/giap-c/.public_html/%P"
Cheng> }
Cheng> http server 1701
Two return commands in a sequence don't make sense because the second
will never be reached. Your binding returns the document with the name
"Content-type: text/html\n\n" which very likely does not exist.
Cheng> anyway if i delete the line of
>>return "Content-type: text/html\n\n"
Cheng> it work fine but just return a text file instead of html file.
Cheng> can't we return the content-type of html?
You can define a mapping from file name extensions (e.g. .html) to
mime types using the http mime command:
http mime text/html .html
The command above will tell scotty to transfer all *.html files with
content-type text/html.
Juergen
-- Juergen Schoenwaelder schoenw@cs.utwente.nl http://www.cs.utwente.nl/~schoenw Computer Science Department, University of Twente, (Fax: +31-53-489-3247) P.O. Box 217, NL-7500 AE Enschede, The Netherlands. (Tel. +31-53-489-3678)-- !! This message is brought to you via the `tkined & scotty' mailing list. !! Please do not reply to this message to unsubscribe. To subscribe or !! unsubscribe, send a mail message to <tkined-request@ibr.cs.tu-bs.de>. !! See http://wwwsnmp.cs.utwente.nl/~schoenw/scotty/ for more information.