Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Have the "raw" webpage try to guess the filename and the mimetype of the artifact being downloaded, if the m= query parameter is omitted. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
af16836c23b4af75986448f16fe3eb49 |
| User & Date: | drh 2012-08-13 16:18:08.194 |
Context
|
2012-08-14
| ||
| 17:30 | Merge in the WYSIWYG editor branch, making WYSIWYG an option for trunk users. WYSIWYG is still off by default. ... (check-in: 65870e8736 user: drh tags: trunk) | |
|
2012-08-13
| ||
| 16:18 | Have the "raw" webpage try to guess the filename and the mimetype of the artifact being downloaded, if the m= query parameter is omitted. ... (check-in: af16836c23 user: drh tags: trunk) | |
| 12:39 | Adjust the $current_page for the doc webpage so that it includes the embedded document being rendered. ... (check-in: 22e2051111 user: drh tags: trunk) | |
Changes
Changes to src/info.c.
| ︙ | ︙ | |||
1203 1204 1205 1206 1207 1208 1209 |
*/
void rawartifact_page(void){
int rid;
const char *zMime;
Blob content;
rid = name_to_rid_www("name");
| < > > > > > > > > | 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 |
*/
void rawartifact_page(void){
int rid;
const char *zMime;
Blob content;
rid = name_to_rid_www("name");
login_check_credentials();
if( !g.perm.Read ){ login_needed(); return; }
if( rid==0 ) fossil_redirect_home();
zMime = P("m");
if( zMime==0 ){
char *zFName = db_text(0, "SELECT filename.name FROM mlink, filename"
" WHERE mlink.fid=%d"
" AND filename.fnid=mlink.fnid", rid);
if( zFName ) zMime = mimetype_from_name(zFName);
if( zMime==0 ) zMime = "application/x-fossil-artifact";
}
content_get(rid, &content);
cgi_set_content_type(zMime);
cgi_set_content(&content);
}
/*
** Render a hex dump of a file.
|
| ︙ | ︙ |