Greetings!

Bill Page <[EMAIL PROTECTED]> 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                                            [EMAIL PROTECTED]
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah


_______________________________________________
Axiom-developer mailing list
Axiom-developer@nongnu.org
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to