Fossil

Ticket Change Details
Login
Overview

Artifact ID: eb6a9f18bf467e985c739809a791fe189ac7c9fe
Ticket: c62fac40af0860d28ad287cb3f203581e00fc9c8
Edit CSS/HTML in Setup adds extra CR/LF, wrong http Content-length
User & Date: anonymous 2008-11-19 23:52:05
Changes

  1. Appended to comment:
    
    
    <hr><i>anonymous added on 2008-11-19 23:52:05:</i><br>
    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 \r\n 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
    
    
    
  2. status changed to: "Open"