Changes On Branch cgiTraceBinary
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch cgiTraceBinary Excluding Merge-Ins

This is equivalent to a diff from 7136ff4c65 to 95f02a572e

2012-11-25
11:16
Use binary mode for CGI trace files. Make CGI trace cross-platform. check-in: 6a8084abcb user: drh tags: ticket-enhancements
02:57
Use binary mode for CGI related trace files. Closed-Leaf check-in: 95f02a572e user: mistachkin tags: cgiTraceBinary
2012-11-24
23:54
Bug fixes in the TICKETCHNG update mechanism. check-in: 7136ff4c65 user: drh tags: ticket-enhancements
23:07
When --httptrace is used with "fossil ui" or "fossil server", create log files containing the text of each HTTP request. check-in: 6f3d328fbf user: drh tags: ticket-enhancements

Changes to src/cgi.c.

   798    798       return;
   799    799     }
   800    800     if( pLog==0 ){
   801    801       char zFile[50];
   802    802       unsigned r;
   803    803       sqlite3_randomness(sizeof(r), &r);
   804    804       sqlite3_snprintf(sizeof(zFile), zFile, "httplog-%08x.txt", r);
   805         -    pLog = fopen(zFile, "w");
          805  +    pLog = fossil_fopen(zFile, "wb");
   806    806       if( pLog ){
   807    807         fprintf(stderr, "# open log on %s\n", zFile);
   808    808       }else{
   809    809         fprintf(stderr, "# failed to open %s\n", zFile);
   810    810         return;
   811    811       }
   812    812     }

Changes to src/main.c.

  1630   1630     fossil_binary_mode(g.httpIn);
  1631   1631     g.cgiOutput = 1;
  1632   1632     blob_read_from_file(&config, zFile);
  1633   1633     while( blob_line(&config, &line) ){
  1634   1634       if( !blob_token(&line, &key) ) continue;
  1635   1635       if( blob_buffer(&key)[0]=='#' ) continue;
  1636   1636       if( blob_eq(&key, "debug:") && blob_token(&line, &value) ){
  1637         -      g.fDebug = fossil_fopen(blob_str(&value), "a");
         1637  +      g.fDebug = fossil_fopen(blob_str(&value), "ab");
  1638   1638         blob_reset(&value);
  1639   1639         continue;
  1640   1640       }
  1641   1641       if( blob_eq(&key, "HOME:") && blob_token(&line, &value) ){
  1642   1642         cgi_setenv("HOME", blob_str(&value));
  1643   1643         blob_reset(&value);
  1644   1644         continue;