Mercurial > urweb
diff src/c/urweb.c @ 740:b302b6e35f93
Add MIME type to file
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 25 Apr 2009 14:47:16 -0400 |
parents | 4bb7e1c0550a |
children | f7e2026dd5ae |
line wrap: on
line diff
--- a/src/c/urweb.c Sat Apr 25 14:35:49 2009 -0400 +++ b/src/c/urweb.c Sat Apr 25 14:47:16 2009 -0400 @@ -632,7 +632,7 @@ case UNSET: { char *data = uw_malloc(ctx, 0); - uw_Basis_file f = {"", {0, data}}; + uw_Basis_file f = {NULL, "", {0, data}}; return f; } case FIL: @@ -2128,6 +2128,10 @@ return f.name; } +uw_Basis_string uw_Basis_fileMimeType(uw_context ctx, uw_Basis_file f) { + return f.type; +} + uw_Basis_blob uw_Basis_fileData(uw_context ctx, uw_Basis_file f) { return f.data; }