Changeset 20805 in project


Ignore:
Timestamp:
10/11/10 15:06:04 (11 years ago)
Author:
sjamaan
Message:

Document file-extension->mime-type in spiffy docs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/spiffy

    r19447 r20805  
    152152    ("ico" . image/vnd.microsoft.icon)
    153153    ("txt" . text/plain))
     154
     155See also {{file-extension->mime-type}} for a procedure which
     156can look up file extensions for you.
    154157
    155158<parameter>(default-mime-type [mime-type])</parameter>
     
    456459filename is interpreted relative to {{root-path}}.
    457460
     461<procedure>(file-extension->mime-type EXT)</procedure>
     462
     463Looks up the file extension {{EXT}} (without a trailing dot)
     464in {{mime-type-map}}, or uses {{default-mime-type}} when the
     465extension can't be found.
     466
     467If {{EXT}} is {{#f}}, it'll look up the extension that is the
     468empty string.
     469
     470This returns a symbol which indicates the mime-type which is matched
     471to the extension (for example {{text/html}}).
     472
    458473<procedure>(restart-request request)</procedure>
    459474
     
    761776=== Changelog
    762777
     778* trunk Export {{file-extension->mime-type}}.
    763779* 4.8 Fix ssl support. Get rid of {{spiffy-root-uri}}. Add timestamp and request info to error log.
    764780* 4.7 Fix redirects for directories again (thanks to [[/users/mario-domenech-goulart|Mario]]). NO TESTCASE (possibly to be fixed in [[uri-generic]])
Note: See TracChangeset for help on using the changeset viewer.