Diff
Not logged in

Differences From:

File src/cgi.c part of check-in [53db94cd41] - Make sure the socket of the "ui" and "server" commands is bound to the specified port when the -P or --port option is used. Ticket 7ef970e4a2 by drh on 2008-11-19 23:33:47. [view]

To:

File src/cgi.c part of check-in [22cb1e1be2] - Here is a better fix for ticket c62fac40af suggested by Kees Nuyt. by drh on 2008-11-20 00:35:23. [view]

@@ -337,25 +337,9 @@
   }
 
   if( iReplyStatus != 304 ) {
     total_size = blob_size(&cgiContent[0]) + blob_size(&cgiContent[1]);
-#ifdef __MINGW32__
-    /* In windows versions of Apache, extra \r characters get added to the
-    ** response, which mess up the Content-Length.  So let apache figure
-    ** out the content length for itself if we are using CGI.  If this
-    ** is a complete stand-alone webserver, on the other hand, we still
-    ** need the Content-Length.
-    */
-    if( g.fullHttpReply ){
-      fprintf(g.httpOut, "Content-Length: %d\r\n", total_size);
-    }
-#else
-    /* On unix, \n to \r\n translation is never a problem.  We know the
-    ** content length, so we might as well go ahead and tell the webserver
-    ** what it is in all cases.
-    */
-    fprintf(g.httpOut, "Content-Length: %d\r\n", total_size);
-#endif
+    fprintf(g.httpOut, "Content-Length: %d\r\n", total_size);
   }
   fprintf(g.httpOut, "\r\n");
   if( total_size>0 && iReplyStatus != 304 ){
     int i, size;