Differences From Artifact [d62ac09e4f]:
- File src/doc.c — part of check-in [c06edd231f] at 2010-05-16 19:08:45 on branch clear-title — Change from GPL to the Simplified BSD License. (user: drh size: 25104)
To Artifact [d8595f240e]:
- File src/doc.c — part of check-in [3343450e64] at 2010-05-21 16:21:04 on branch trunk — Fix issues with attachments on tickets. In the artifact viewer, do a better job of detecting JPEG images from the content prefix. (user: drh size: 25156)
| ︙ | |||
49 50 51 52 53 54 55 56 57 58 59 60 61 62 | 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | + |
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\r", 8, "image/png" },
{ "\377\332\377", 3, "image/jpeg" },
{ "\377\330\377", 3, "image/jpeg" },
};
x = (const unsigned char*)blob_buffer(pBlob);
n = blob_size(pBlob);
for(i=0; i<n; i++){
unsigned char c = x[i];
if( c<=0x1f && isBinary[c] ){
|
| ︙ |