[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Axiom-developer] RE: [Gcl-devel] Re: axiom porting
From: |
Camm Maguire |
Subject: |
Re: [Axiom-developer] RE: [Gcl-devel] Re: axiom porting |
Date: |
05 May 2005 14:35:54 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Greetings!
Bill Page <address@hidden> writes:
> Camm Maguire wrote:
>
> >>Using IE, the problem seems to intermittant. It works for a while
> >>with some urls and not others.
> >>
> >
> >Does this mean that there are some errors that are 100% reproducible?
> >If so, start with those.
> >
> Yes.
>
> >IE appears to be closing the socket before your write completes. The
> >odd thing is that you report that it is intermittent. There are two
> >possibiities that come to mind -- either ie insists on a complete set
> >of html headers from the server, or there is a timeout issue.
> >
> Ok, problem solved (I think). It turned out not to be so exotic an issue.
> I modified the web server program as follows:
>
> - (format s "HTTP/1.1 ~S~%" (if fn 404 500))
> + (format s "HTTP/1.1 ~S~%" (if fn 200 404 ))
>
Thanks! This is just what we need -- an html guy!
BTW, misspoke earlier re: suggested edit to #"foo. What I meant was:
(defun foo (s)
(let* ((get (read s nil 'eof))
(fn (and (eq get 'get) (string-downcase (read s nil 'eof))))
(file (probe-file fn)))
(format s "HTTP/1.1 ~S~%" (if fn 200 404))
(format s "Content-type: text/html~%~%")
(if file
(with-open-file (q file) (si::copy-stream q s))
(let ((dir (directory (if (eql (aref fn (1- (length fn))) #\/) fn
(si::string-concatenate fn "/")))))
(dolist (l dir)
(let ((n (namestring l)))
(format s "<a href=\"~a\">~a</a> <a href=\"~a/\"> /... </a><br>~%"
n n n)))))
(close s)))
which should function the same as what you have but express the
precedence better. This counts on probe-file returning nil for
directories.
Take care,
> If I understand HTTP correctly "404" in the header means "file not found".
> "200" means "ok". "500" means server error. So we were both saying
> "file not found" but then delivering the file anyway. If that's the case
> then it is surprizing that FireFox worked and not surprizing that IE closes
> the socket connection before we can send the file.
>
> With this change both FireFox and IE now seem to work reliable
> and identically for me.
>
> Anyway, I will take a closer look at the HTTP standard to make sure
> that our headers are correct and complete.
>
> Regards,
> Bill Page.
>
>
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
- RE: [Axiom-developer] RE: [Gcl-devel] Re: axiom porting, (continued)
- Re: [Axiom-developer] RE: [Gcl-devel] Re: axiom porting, Camm Maguire, 2005/05/05
- Re: [Axiom-developer] RE: [Gcl-devel] Re: axiom porting, Bill Page, 2005/05/05
- RE: [Axiom-developer] RE: [Gcl-devel] Re: axiom porting, Mike Thomas, 2005/05/05
- Re: [Axiom-developer] RE: [Gcl-devel] Re: axiom porting, Bill Page, 2005/05/04
- RE: [Axiom-developer] RE: [Gcl-devel] Re: axiom porting, Mike Thomas, 2005/05/05
- Re: [Axiom-developer] RE: [Gcl-devel] Re: axiom porting, Bill Page, 2005/05/05
- Re: [Axiom-developer] RE: [Gcl-devel] Re: axiom porting, Camm Maguire, 2005/05/05
- Re: [Axiom-developer] RE: [Gcl-devel] Re: axiom porting, Bill Page, 2005/05/05
- Re: [Axiom-developer] RE: [Gcl-devel] Re: axiom porting,
Camm Maguire <=
- Re: [Axiom-developer] RE: [Gcl-devel] Re: axiom porting, Bill Page, 2005/05/06
- Re: [Axiom-developer] RE: [Gcl-devel] Re: axiom porting, Camm Maguire, 2005/05/05
- Re: [Axiom-developer] RE: [Gcl-devel] Re: axiom porting, Camm Maguire, 2005/05/05