Hello Gustaf,
Thanks for the answer,
I already saw that post, and I tested successfully this trick. I was writting to the mailing when I saw your mail, thanks anyway ;-)
++
Marc

Gustaf Neumann a écrit :
Dear marc,

hmm, i fixed already one problem with ns_startcontent on the aolserver
(see http://openacs.org/forums/message-view?message_id=457933)
but more seems to be needed. The following should do the trick.
I'll do some more testing and if there is no surprise showing up,
i will add this to openacs cvs


-gustaf

ad_proc -public ReturnHeaders {{content_type text/html}} {
   We use this when we want to send out just the headers
   and then do incremental writes with ns_write.  This way the user
   doesn't have to wait for streamed output (useful when doing
   bulk uploads, installs, etc.).

   It returns status 200 and all headers including
   any added to outputheaders.
} {
   set all_the_headers "HTTP/1.0 200 OK
MIME-Version: 1.0
Content-Type: $content_type\r\n"
    util_WriteWithExtraOutputHeaders $all_the_headers
    if {[string match text/* $content_type]} {
      if {![string match *charset=* $content_type]} {
append content_type "; charset=[ns_config ns/parameters OutputCharset iso-8859-1]"
      }
      ns_startcontent -type $content_type
    } else {
      ns_startcontent
    }
}



--
Programmers.ch
Solutions libres et Opensources
Tel: ++41 76 44 888 72
Site: http://www.programmers.ch
Site: http://openprojects.ch


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to