--- nsvhr.c-orig Wed Jan 22 10:20:33 2003 +++ nsvhr.c Mon Feb 10 22:03:18 2003 @@ -100,7 +100,7 @@ static int LocationSplit(char *url, Location *loc); static int VHRProc(void *context, Ns_Conn *conn); static int TCPProxy(Ns_Conn *conn, Location *loc); -static void SockWrite(int sock, char *string); +static void SockWrite(int sock, char *string, int towrite); static int TimedSockDump(int sock, Ns_Conn *conn, int timeout); static int UDSProxy(Ns_Conn *conn, Location *loc); @@ -430,7 +430,7 @@ if (conn->contentLength > 0) { Ns_ConnCopyToDString(conn, (unsigned) conn->contentLength, &request); } - SockWrite(sock, request.string); + SockWrite(sock, request.string, request.length); if (TimedSockDump(sock, conn, gTimeout) == NS_ERROR) { if (busyUrl == NULL) { Ns_ConnReturnNotice(conn, 408, "408 Request Timeout", @@ -465,14 +465,12 @@ */ static void -SockWrite(int sock, char *string) +SockWrite(int sock, char *string, int towrite) { - int wrote, towrite; + int wrote; assert(string != NULL); assert(sock != INVALID_SOCKET); - - towrite = strlen(string); assert(towrite > 0); do {