Problem when using a stylesheet

"Thibaut de Pontcharra" <[email protected]> Tue, 9 Mar 2004 20:57:13 -0800
Newsgroups gmane.lisp.cl-http
Message-ID <[email protected]>
Dear cl-http users, 

I've had problems using a stylesheet with cl-http70-190a (with Lispworks 4.2 personal edition and Windows 2000 pro)

I have exported the stylesheet with the following code:

(export-url #u"/lispserver/css/enlight2.css"
            :css-file
            :pathname "http:www;lispserver;public-html;css;enlight2.css"
            :expiration `(:interval ,(* 15. 60.))
            :public t
            :keywords '(:cl-http :demo))



This is the beginning of the method which displays the page using the stylesheet. After the document preamble, I call the function (write-document-style), which I have pointed out in the code, and which simply formats a <link> tag on my web page:

(defmethod write-template-page ((url http-url) stream)
  (with-conditional-get-response (stream :html :expires (url:expiration-universal-time url)
      :cache-control (url:response-cache-control-directives url)
      :content-language (url:languages url))
     (with-html-document (:declare-dtd-version-p t :stream stream)
        (with-document-preamble (:stream stream)
---->          (write-document-style "css/enlight2.css" stream)   
           (declare-title "My template" :stream stream)) ...

Here's the small function which outputs the stylesheet tag:

(defun write-document-style (stylesheet stream)
  (fast-format stream "<link rel=\"stylesheet\" href=\"~A\" type=\"text/css\">" stylesheet))


The problem is that when I call the page from my browser, the server hangs for about 10 seconds, after which everything is displayed correctly. Has anyone encountered this problem before?
As a matter of fact, I have used exactly the same code on a Linux pc, using CMUCL and an older version of cl-http, and it worked perfectly.
By the way, is there any method in cl-http used to call a stylesheet in the computed page?

Thanks in advance,

Thibaut de Pontcharra