On 29.09.2007, at 15:32, Stephen Deasey wrote: > > As far as I can tell, we already support streaming binary data, both > to HTTP 1.0 and 1.1 clients (and also to non-HTTP custom clients). > > Can you show some example code? What did you expect would happen, what > actually happened?
OK. Very simple. I must generate/send headers with ns_headers but without Content-Length element. Later, I get [bs_conn channel] and use it to pump the data to remote from custom C-code writing to the connection channel. The length of data is not known in advance, hence I cannot have Content-Length set in output headers. At the moment there is no way to do that. It was before. Some later chnage(s) disabled it. So I changed ns_headers to allow -1 for optional length argument in which case Content-Length is removed from output headers before flushing them. Then I saw the ChangeLog entry about "-binary" flag to ns_headers but I could not find it in the code. Hence the question.... (still not answered) > > >> Still: what good is ns_startcontent when you have >> ns_headers and ns_write? > > > I don't think it makes sense any more. > > It came from the old ArsDigita encoding patches to aolserver-3.x. The > idea was you would write your own headers using ns_write, then you'd > call ns_startcontent to signify that you'd finished writing headers > and were now going to write content in some particular encoding, so > the ns_write command should now encode the data you pass it. Headers > should always be ascii. > > Here's an example: > > http://naviserver.cvs.sourceforge.net/naviserver/naviserver/tests/ > tclresp.test?revision=1.14&view=markup#l_496 > > This is all handled automatically now, and ns_startcontent should > not be used. > Why don't we declare it deprecated? It just confuses people (at least it confused me). Cheers Zoran ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ naviserver-devel mailing list naviserver-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/naviserver-devel