Changeset 18064 in project


Ignore:
Timestamp:
05/13/10 15:55:38 (9 years ago)
Author:
sjamaan
Message:

Provide proper default mime types, according to IANA-assigned names. Thanks to zbigniew for pointing out that I was using obsolete mimetypes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/spiffy/trunk/spiffy.scm

    r18031 r18064  
    7878(define server-bind-address (make-parameter #f))
    7979(define index-files         (make-parameter '("index.html" "index.xhtml")))
     80
     81;; See http://www.iana.org/assignments/media-types/ for a full list
     82;; with links to RFCs describing the gory details.
    8083(define mime-type-map
    8184  (make-parameter
    82    '(("xml" . text/xml)
    83      ("html" . text/html)
    84      ("xhtml" . text/xhtml+xml)
    85      ("js"  . text/javascript)
    86      ("pdf" . application/pdf)
     85   '(("html" . text/html)
     86     ("xhtml" . application/xhtml+xml)
     87     ("js"  . application/javascript)
    8788     ("css" . text/css)
    8889     ("png" . image/png)
    89      ("ico" . image/x-icon)
    90      ("gif" . image/gif)
     90     ;; A charset parameter is STRONGLY RECOMMENDED by RFC 3023 but it overrides
     91     ;; document declarations, so don't supply it (assume nothing about files)
     92     ("xml" . application/xml)
     93     ;; Use text/xml only if it is *truly* human-readable (eg docbook, recipe...)
     94     #;("xml" . application/xml)
     95     ("pdf" . application/pdf)
    9196     ("jpeg" . image/jpeg)
    9297     ("jpg" . image/jpeg)
    93      ("svg" . image/svg+xml)
    94      ("bmp" . image/bmp)
     98     ("gif" . image/gif)
     99     ("ico" . image/vnd.microsoft.icon)
    95100     ("txt" . text/plain))))
    96101(define default-mime-type (make-parameter 'application/octet-stream))
Note: See TracChangeset for help on using the changeset viewer.