Thanks for the fix, drh.

  *  Bad news: I'm afraid it didn't really fix it. The contents of the EditCSS textbox still have extra \r , so line spacing increases by one after every edit.

  *  Good news: stdout can be made binary with setmode(), which prevents the \n to translation.

<verbatim>
Patches for main.c:

{line 30, in header includes}
= #include <time.h>
+ #ifdef __MINGW32__
+ /* Define file mode constants */
+ #include <fcntl.h>
+ #endif

{line 615, in cmd_cgi() }
=  g.httpOut = stdout;
+ #ifdef __MINGW32__
+   /* prevent \n to \r \n translation on Windows */
+   setmode( _fileno(g.httpOut), _O_BINARY );
+ #endif

The workaround in cgi.c, function cgi_reply() , is no longer necessary; the content-length header is valid.
</verbatim>

Full diffs will be posted on the fossil-users mailing list.

Environment: Windows Vista, Apache httpd 2.2.9, mod_cgi, fossil [63886daad8] 2008-11-18 15:33:25 UTC