On Windows native port, cachemgr parses the squid output in TEXT mode, with a wrong resultant Content-Length in html pages, see this thread for details:
http://www1.it.squid-cache.org/mail-archive/squid-dev/200306/0044.html
The attached patch force cachemgr to work only on BINARY mode and contents a cosmetic change.
Regards
Guido
- ======================================================== Guido Serassio Acme Consulting S.r.l. Via Gorizia, 69 10136 - Torino - ITALY Tel. : +39.011.3249426 Fax. : +39.011.3293665 Email: [EMAIL PROTECTED] WWW: http://www.acmeconsulting.it/
Index: cachemgr.cc
===================================================================
RCS file: /cvsroot/squid/squid3/src/cachemgr.cc,v
retrieving revision 1.6
diff -u -p -r1.6 cachemgr.cc
--- cachemgr.cc 22 Feb 2003 03:14:31 -0000 1.6
+++ cachemgr.cc 10 Aug 2003 09:13:52 -0000
@@ -542,8 +542,9 @@ read_reply(int s, cachemgr_request * req
}
#ifdef _SQUID_MSWIN_
- while ((reply=recv(s,buf,sizeof(buf),0))>0)
- fwrite(buf,1,reply,fp);
+
+ while ((reply=recv(s, buf , sizeof(buf), 0)) > 0)
+ fwrite(buf, 1, reply, fp);
rewind(fp);
@@ -770,6 +771,9 @@ main(int argc, char *argv[])
#ifdef _SQUID_MSWIN_
Win32SockInit();
+ _setmode( _fileno( stdin ), _O_BINARY );
+ _setmode( _fileno( stdout ), _O_BINARY );
+ _fmode = _O_BINARY;
if ((s = strrchr(argv[0], '\\')))
#else
