About the web server in chapter 13

233 views
Skip to first unread message

reverland

unread,
May 11, 2012, 10:44:13 PM5/11/12
to land-o...@googlegroups.com
I'm a newbie in lisp,and i was atractted by this interesting book.However,when I tried the webserver provided in the chapter 13,a problem puzzled me.
my firefox get the stream as the plain text rather than html format.
I'was confused so I tried konqueror as well,the server even didn't work!
Then I tried opera,plain text as well.
I tried to read the http request through firebugs to find something,but didn't have any idea about the problem
I tried to resort to google but it didn't help either.

Is there any one that have any idea about solving this problem?
Thanks,and be sorry for poor English.

Purity Control

unread,
May 12, 2012, 3:49:47 AM5/12/12
to land-o...@googlegroups.com
Hi @reverland,

Your English is just fine, dont worry about it.

The problem with things like web servers are there are so many things that could be wrong and they may not be to do with lisp.

The other problem is that it sounds like you are trying to learn about two things at the same time; making a web serve and programming lisp. This is not a problem but don't confuse not understanding lisp with not getting a web server up and running.

It sounds like the output being sent is being read in as plain text rather than html. These options are set by mime types.

The first thing I would do is use telnet to connect to the server and see what response you get back. This will show that lisp is working and sending information out on the port (we know that already because some web servers are showing information). But it will also show you the text your web server is sending on a successful connection.

You can google the responses that a web server should accept and respond to. A good starting place is here 


The you will need to use a little detective work and trial and error to work out where your problems are.

Good Luck with the learning!
Message has been deleted

Yuyang Liu

unread,
May 12, 2012, 4:44:58 AM5/12/12
to land-o...@googlegroups.com
Thanks for detailed response,It's really helpful.
I don't know much about telnet,but I've found some important clues in wikipedia.
Then I added a line before the server response followed with a blank line:
HTTP/1.1 200 OK
wonderfully it worked!!
Thanks again!


2012/5/12 Purity Control <cr...@puritycontrol.net>


On Saturday, May 12, 2012 3:44:13 AM UTC+1, reverland wrote:



--
yours sincerely
Reverland
Lyy

reverland

unread,
Jul 2, 2012, 1:29:10 AM7/2/12
to land-o...@googlegroups.com
You'd better keep the html standards if you want the server worked under firefox10 or higher.Some change is needed,such as <html><head><head/><body>...<body/><html/>,and HTTP/1.1 200 OK followed with a blank line.
在 2012年5月12日星期六UTC+8上午10时44分13秒,reverland写道:
Reply all
Reply to author
Forward
0 new messages