The Ns_ConnContentLength function returns the number of bytes in the content associated with the connection.
Example
/* Copy the content from the browser to a DString. */
Ns_DString ds;
int len;
Ns_DStringInit(&ds);
len = Ns_ConnContentLength(conn);
Ns_ConnCopyToDString(conn, len, &ds);