Automatically set the charset= attribute in the Content-Type: header
[hunchentoot.git] / hunchentoot.asd
blob04e7413263655a293301c3d02cc88bff1543a2a3
1 ;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
2 ;;; $Header: /usr/local/cvsrep/hunchentoot/hunchentoot.asd,v 1.61 2008/04/09 08:17:48 edi Exp $
4 ;;; Copyright (c) 2004-2010, Dr. Edmund Weitz.  All rights reserved.
6 ;;; Redistribution and use in source and binary forms, with or without
7 ;;; modification, are permitted provided that the following conditions
8 ;;; are met:
10 ;;;   * Redistributions of source code must retain the above copyright
11 ;;;     notice, this list of conditions and the following disclaimer.
13 ;;;   * Redistributions in binary form must reproduce the above
14 ;;;     copyright notice, this list of conditions and the following
15 ;;;     disclaimer in the documentation and/or other materials
16 ;;;     provided with the distribution.
18 ;;; THIS SOFTWARE IS PROVIDED BY THE AUTHOR 'AS IS' AND ANY EXPRESSED
19 ;;; OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 ;;; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 ;;; ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
22 ;;; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 ;;; DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
24 ;;; GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 ;;; INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 ;;; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27 ;;; NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 ;;; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 (in-package :cl-user)
32 (defpackage :hunchentoot-asd
33   (:use :cl :asdf))
35 (in-package :hunchentoot-asd)
37 (defvar *hunchentoot-version* "1.1.1"
38   "A string denoting the current version of Hunchentoot.  Used
39 for diagnostic output.")
41 (export '*hunchentoot-version*)
43 (defsystem :hunchentoot
44   :serial t
45   :version #.*hunchentoot-version*
46   :depends-on (:chunga
47                :cl-base64
48                :cl-fad
49                :cl-ppcre
50                :flexi-streams
51                #-(or :lispworks :hunchentoot-no-ssl) :cl+ssl
52                :md5
53                :rfc2388
54                :trivial-backtrace
55                #-:lispworks :usocket
56                #-:lispworks :bordeaux-threads)
57   :components ((:module url-rewrite
58                 :serial t
59                 :components ((:file "packages")
60                              (:file "specials")
61                              (:file "primitives")
62                              (:file "util")
63                              (:file "url-rewrite")))
64                (:file "packages")
65                #+:lispworks (:file "lispworks")
66                #-:lispworks (:file "compat")
67                (:file "specials")
68                (:file "conditions")
69                (:file "mime-types")
70                (:file "util")
71                (:file "log")
72                (:file "cookie")
73                (:file "reply")
74                (:file "request")
75                (:file "session")
76                (:file "misc")
77                (:file "easy-handlers")
78                (:file "headers")
79                (:file "set-timeouts")
80                (:file "taskmaster")
81                (:file "acceptor")
82                #-:hunchentoot-no-ssl (:file "ssl")))
84 (defsystem :hunchentoot-test
85   :components ((:module "test"
86                         :serial t
87                         :components ((:file "packages")
88                                      (:file "test-handlers")
89                                      (:file "script-engine")
90                                      (:file "script"))))
91   :depends-on (:hunchentoot :cl-who :cl-ppcre :drakma))
93 (defmethod perform ((o test-op) (c (eql (find-system 'hunchentoot))))
94   (operate 'load-op 'hunchentoot-test)
95   (format t "~&;; Starting web server on localhost:4242.")
96   (force-output)
97   (funcall (intern (symbol-name :start) (find-package :hunchentoot))
98            (make-instance (intern (symbol-name :acceptor) (find-package :hunchentoot)) :port 4242))
99   (format t "~&;; Sleeping 2 seconds...")
100   (force-output)
101   (sleep 2)
102   (format t "~&;; Now running confidence tests.")
103   (force-output)
104   (funcall (intern (symbol-name :test-hunchentoot) (find-package :hunchentoot-test))
105            "http://localhost:4242"))