Fossil

Check-in [5590fb9e0f]
Login

Check-in [5590fb9e0f]

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

Overview
Comment:Added webp mimetype, a pedantic constness tweak in the mimetype table, and a minor typo fix.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5590fb9e0f64194d70eb1327e524753399e777e66e900c3b697f560eb021c1cb
User & Date: stephan 2019-12-13 06:06:04.995
Context
2019-12-13
20:56
If path given to /ext is a directory and it contains an index file (of the same names supported by the /doc path), render that index file. Edit: closing branch b/c Richard implemented the same thing in parallel in [3ed3fa3dda9c6d6f]. ... (Closed-Leaf check-in: f28cea2b43 user: stephan tags: ext-render-index)
18:57
Enhance the /ext page to search for "index.*" files if the pathname ends with "/" and is a directory name. ... (check-in: 3ed3fa3dda user: drh tags: trunk)
13:06
Markdown-to-HTML now adds automatically-generated ID attributes to the headers to facilitate creating intra-document links and hyperlinked tables of contents. The ID algorithm is simply to lower-case all ASCII alphanumeric characters in the header text. ... (check-in: 88eb24a9a5 user: stephan tags: markdown-header-ids)
06:06
Added webp mimetype, a pedantic constness tweak in the mimetype table, and a minor typo fix. ... (check-in: 5590fb9e0f user: stephan tags: trunk)
2019-12-11
12:43
Rename the CGI control file variable "debug:" to "cgi-debug:" and enhance it so that it shows the complete CGI environment at the start of each request. Also add documentation. ... (check-in: 4a7760e368 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/doc.c.
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
  int n;
  const unsigned char *x;

  /* A table of mimetypes based on file content prefixes
  */
  static const struct {
    const char *zPrefix;       /* The file prefix */
    int size;                  /* Length of the prefix */
    const char *zMimetype;     /* The corresponding mimetype */
  } aMime[] = {
    { "GIF87a",                  6, "image/gif"  },
    { "GIF89a",                  6, "image/gif"  },
    { "\211PNG\r\n\032\n",       8, "image/png"  },
    { "\377\332\377",            3, "image/jpeg" },
    { "\377\330\377",            3, "image/jpeg" },







|







37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
  int n;
  const unsigned char *x;

  /* A table of mimetypes based on file content prefixes
  */
  static const struct {
    const char *zPrefix;       /* The file prefix */
    const int size;            /* Length of the prefix */
    const char *zMimetype;     /* The corresponding mimetype */
  } aMime[] = {
    { "GIF87a",                  6, "image/gif"  },
    { "GIF89a",                  6, "image/gif"  },
    { "\211PNG\r\n\032\n",       8, "image/png"  },
    { "\377\332\377",            3, "image/jpeg" },
    { "\377\330\377",            3, "image/jpeg" },
267
268
269
270
271
272
273

274
275
276
277
278
279
280
  { "vcd",        3, "application/x-cdlink"              },
  { "vda",        3, "application/vda"                   },
  { "viv",        3, "video/vnd.vivo"                    },
  { "vivo",       4, "video/vnd.vivo"                    },
  { "vrml",       4, "model/vrml"                        },
  { "wav",        3, "audio/x-wav"                       },
  { "wax",        3, "audio/x-ms-wax"                    },

  { "wiki",       4, "text/x-fossil-wiki"                },
  { "wma",        3, "audio/x-ms-wma"                    },
  { "wmv",        3, "video/x-ms-wmv"                    },
  { "wmx",        3, "video/x-ms-wmx"                    },
  { "wrl",        3, "model/vrml"                        },
  { "wvx",        3, "video/x-ms-wvx"                    },
  { "xbm",        3, "image/x-xbitmap"                   },







>







267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
  { "vcd",        3, "application/x-cdlink"              },
  { "vda",        3, "application/vda"                   },
  { "viv",        3, "video/vnd.vivo"                    },
  { "vivo",       4, "video/vnd.vivo"                    },
  { "vrml",       4, "model/vrml"                        },
  { "wav",        3, "audio/x-wav"                       },
  { "wax",        3, "audio/x-ms-wax"                    },
  { "webp",       4, "image/webp"                        },
  { "wiki",       4, "text/x-fossil-wiki"                },
  { "wma",        3, "audio/x-ms-wma"                    },
  { "wmv",        3, "video/x-ms-wmv"                    },
  { "wmx",        3, "video/x-ms-wmx"                    },
  { "wrl",        3, "model/vrml"                        },
  { "wvx",        3, "video/x-ms-wvx"                    },
  { "xbm",        3, "image/x-xbitmap"                   },
Changes to www/serverext.wiki.
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
web browser.  The FOSSIL_NONCE variable contains the value of that nonce.
So, in other words, to get javascript to work, it must be enclosed in:

<blockquote><verbatim>
<script nonce='$FOSSIL_NONCE'>...</script>
</verbatim></blockquote>

Except, of course, the $FOSSIL_NONCE is replace by the value of the
FOSSIL_NONCE environment variable.

If the HTTP request includes content (for example if this is a POST request)
then the CONTENT_LENGTH value will be positive and the data for the content
will be readable on standard input.

<h2>4.0 CGI Outputs</h2>







|







199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
web browser.  The FOSSIL_NONCE variable contains the value of that nonce.
So, in other words, to get javascript to work, it must be enclosed in:

<blockquote><verbatim>
<script nonce='$FOSSIL_NONCE'>...</script>
</verbatim></blockquote>

Except, of course, the $FOSSIL_NONCE is replaced by the value of the
FOSSIL_NONCE environment variable.

If the HTTP request includes content (for example if this is a POST request)
then the CONTENT_LENGTH value will be positive and the data for the content
will be readable on standard input.

<h2>4.0 CGI Outputs</h2>