Re: [naviserver-devel] Ns_ConnFlushHeaders() deprecated: why?

2010-05-05 Thread Vasiljevic Zoran

On 04.05.2010, at 18:48, Stephen Deasey wrote:

 Flushing headers is discouraged because it isn't needed for HTTP, it's
 slow, and often extra headers need to be added depending on which
 Write* calls you use.

See my other mail...
It is that my response is just headers, nothinh else. So I need
the means of closing the request and sending just the headers
w/o response body.


 I guess you could give access to nContentSent in a new public API.
 What are you using it for? How are you writing the data?

Well no data, just headers! I set some headers and want to send
them to the remote w/o supplying any data. I gave some example
in the other email to illustrate.

Cheers
Zoran


--
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Re: [naviserver-devel] Ns_ConnFlushHeaders() deprecated: why?

2010-05-04 Thread Stephen Deasey
On Tue, May 4, 2010 at 4:50 PM, Vasiljevic Zoran z...@archiware.com wrote:
 Hi all!

 Tcl_WideInt
 Ns_ConnFlushHeaders(Ns_Conn *conn, int status)
 {
     Conn *connPtr = (Conn *) conn;

     Ns_ConnSetResponseStatus(conn, status);
     Ns_ConnWriteData(conn, NULL, 0, 0);

     return connPtr-nContentSent;
 }

 This function is set as deprecated. It returns number of bytes sent.
 I cannot see that connPtr-nContentSent is exposed from outside
 so how am I to obtain the original Ns_ConnFlushHeaders functionality
 w/o accessing internal connection state?


Flushing headers is discouraged because it isn't needed for HTTP, it's
slow, and often extra headers need to be added depending on which
Write* calls you use.

I guess you could give access to nContentSent in a new public API.
What are you using it for? How are you writing the data?

--
___
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel