diff -ru cl-http-70-156a-pre.orig/cmucl/client/sysdcl.lisp cl-http-70-156a-pre/cmucl/client/sysdcl.lisp --- cl-http-70-156a-pre.orig/cmucl/client/sysdcl.lisp 2001-11-06 13:48:13.000000000 -0200 +++ cl-http-70-156a-pre/cmucl/client/sysdcl.lisp 2002-10-08 22:09:19.000000000 -0300 @@ -12,7 +12,7 @@ (in-package "CL-USER") -(defsystem cl-http-client +(mk:defsystem cl-http-client :source-pathname "HTTP:" :components ("client;variables" ; Client variables diff -ru cl-http-70-156a-pre.orig/cmucl/lambda-ir/sysdcl.lisp cl-http-70-156a-pre/cmucl/lambda-ir/sysdcl.lisp --- cl-http-70-156a-pre.orig/cmucl/lambda-ir/sysdcl.lisp 1997-11-27 23:45:19.000000000 -0200 +++ cl-http-70-156a-pre/cmucl/lambda-ir/sysdcl.lisp 2002-10-08 22:10:04.000000000 -0300 @@ -1,6 +1,6 @@ ;;; -(defsystem lambda-ir +(mk:defsystem lambda-ir :source-pathname "HTTP:" :components ("lambda-ir;package" diff -ru cl-http-70-156a-pre.orig/cmucl/proxy/sysdcl.lisp cl-http-70-156a-pre/cmucl/proxy/sysdcl.lisp --- cl-http-70-156a-pre.orig/cmucl/proxy/sysdcl.lisp 2000-05-31 07:07:21.000000000 -0300 +++ cl-http-70-156a-pre/cmucl/proxy/sysdcl.lisp 2002-10-08 22:09:38.000000000 -0300 @@ -5,7 +5,7 @@ (in-package :cl-user) -(defsystem cl-http-proxy +(mk:defsystem cl-http-proxy :source-pathname "HTTP:" :components (;; Proxy layer diff -ru cl-http-70-156a-pre.orig/cmucl/server/sysdcl.lisp cl-http-70-156a-pre/cmucl/server/sysdcl.lisp --- cl-http-70-156a-pre.orig/cmucl/server/sysdcl.lisp 1999-09-09 17:17:18.000000000 -0300 +++ cl-http-70-156a-pre/cmucl/server/sysdcl.lisp 2002-10-08 22:09:12.000000000 -0300 @@ -2,7 +2,7 @@ (in-package "CL-USER") -(defsystem cl-http +(mk:defsystem cl-http :source-pathname "HTTP:" :components ("cmucl;server;cmucl-patch" ; CMU CL patches. @@ -99,7 +99,7 @@ :source-pathname "cmucl;server;" :components ("precom")))) -(defsystem cl-http-examples +(mk:defsystem cl-http-examples :source-pathname "HTTP:examples;" :components ("configuration" ; server configuration file diff -ru cl-http-70-156a-pre.orig/cmucl/server/tcp-interface-mp.lisp cl-http-70-156a-pre/cmucl/server/tcp-interface-mp.lisp --- cl-http-70-156a-pre.orig/cmucl/server/tcp-interface-mp.lisp 2000-08-17 10:34:31.000000000 -0300 +++ cl-http-70-156a-pre/cmucl/server/tcp-interface-mp.lisp 2002-10-19 13:00:25.000000000 -0200 @@ -61,12 +61,12 @@ (fd) (declare (fixnum retry-wait)) (handler-case - (setf fd (ext:create-inet-listener port :stream + (setf fd (ext:create-inet-listener port :stream :reuse-address t)) - (error () + (error (condition) (format t "~&Warning: unable to create listner on ~ - port ~d; retry in ~d seconds.~%" - port retry-wait) + port ~d; retry in ~d seconds (~a).~%" + port retry-wait condition) (sleep retry-wait)))) (loop ;; Wait until input ready. @@ -81,7 +81,6 @@ new-fd=~s port-~s~%" fd new-fd port)) (let ((stream (www-utils::make-tcp-stream new-fd port))) ;; Make it non-blocking. - #+nil (unix:unix-fcntl new-fd unix:f-setfl unix:fndelay) (listen-for-connection stream port))))) ;; Close the listener stream. @@ -187,13 +186,17 @@ (disable-http-service on-ports) ;; before starting a new batch (dolist (port (setf (listening-on-http-ports) (ensure-list on-ports))) - (%start-listening-for-connections port 0) + (ensure-http-protocol-on-port port) ;; Advise the user. (expose-log-window) (notify-log-window "HTTP service enabled for: http://~A:~D/" (www-utils:local-host-domain-name) port)) on-ports) +(defun ensure-http-protocol-on-port (port) + (unless (assoc port *listener-processes*) + (%start-listening-for-connections port 0))) + (defun disable-http-service (&optional ports) ;; Disable all listeners. (let ((rem-listeners nil)) diff -ru cl-http-70-156a-pre.orig/cmucl/start.lisp cl-http-70-156a-pre/cmucl/start.lisp --- cl-http-70-156a-pre.orig/cmucl/start.lisp 2001-11-13 12:17:13.000000000 -0200 +++ cl-http-70-156a-pre/cmucl/start.lisp 2002-11-02 18:18:21.000000000 -0200 @@ -23,11 +23,11 @@ #+nil (pushnew 'compile pcl::*defclass-times*) #+nil (pushnew 'compile pcl::*defgeneric-times*)) -#+cmu17 +#+cmu (setf c:*suppress-values-declaration* t) (defvar *cl-http-options* - '(:ask-compile #+nil :compile + '(:ask-compile :compile ; :cl-http-client ; Basic client substrate. ; :cl-http-proxy ; Requires the client. ; :w4-web-walker ; Requires the client. @@ -36,7 +36,7 @@ ;; May not want to load the examples when dumping a lisp core. :cl-http-examples ; :w4-web-walker-demo - :ask-enable #+nil :enable)) + :ask-enable :enable)) ;;; It's simple to assume the default directory has been set once to ;;; the CL-HTTP directory. Then access to working-directory is all @@ -96,52 +96,52 @@ ((:and :external :macro) (declare (optimize (safety 2)))) (:macro (declare (optimize (speed 0)))))) - (compile-system 'cl-http) + (mk:compile-system 'cl-http) (when (member :cl-http-client *cl-http-options*) - (compile-system 'cl-http-client)) + (mk:compile-system 'cl-http-client)) (when (member :cl-http-proxy *cl-http-options*) - (compile-system 'cl-http-proxy)) + (mk:compile-system 'cl-http-proxy)) (when (member :w4-web-walker *cl-http-options*) - (compile-system 'w4-web-walker)) + (mk:compile-system 'w4-web-walker)) (when (member :lambda-ir *cl-http-options*) - (compile-system 'lambda-ir)) + (mk:compile-system 'lambda-ir)) (when (member :cl-http-examples *cl-http-options*) - (compile-system 'cl-http-examples)) + (mk:compile-system 'cl-http-examples)) (when (member :w4-web-walker-demo *cl-http-options*) - (compile-system 'w4-web-walker-demo)))) + (mk:compile-system 'w4-web-walker-demo)))) (t - (load-system 'cl-http + (mk:load-system 'cl-http :compile-during-load () :load-source-if-no-binary t :bother-user-if-no-binary ()) (when (member :cl-http-client *cl-http-options*) - (load-system 'cl-http-client + (mk:load-system 'cl-http-client :compile-during-load () :load-source-if-no-binary t :bother-user-if-no-binary ())) (when (member :cl-http-proxy *cl-http-options*) - (load-system 'cl-http-proxy + (mk:load-system 'cl-http-proxy :compile-during-load () :load-source-if-no-binary t :bother-user-if-no-binary ())) (when (member :w4-web-walker *cl-http-options*) - (load-system 'w4-web-walker + (mk:load-system 'w4-web-walker :compile-during-load () :load-source-if-no-binary t :bother-user-if-no-binary ())) (when (member :lambda-ir *cl-http-options*) - (load-system 'lambda-ir + (mk:load-system 'lambda-ir :compile-during-load () :load-source-if-no-binary t :bother-user-if-no-binary ())) (when (member :cl-http-examples *cl-http-options*) - (load-system 'cl-http-examples + (mk:load-system 'cl-http-examples :compile-during-load () :load-source-if-no-binary t :bother-user-if-no-binary ())) (when (and (member :cl-http-examples *cl-http-options*) (member :w4-web-walker-demo *cl-http-options*)) - (load-system 'w4-web-walker-demo + (mk:load-system 'w4-web-walker-demo :compile-during-load () :load-source-if-no-binary t :bother-user-if-no-binary ())))) @@ -149,8 +149,8 @@ ;;; Compile and load the HTML parser which may be loaded stand-alone. (when (member :html-parser *cl-http-options*) (load "HTTP:html-parser;v10;sysdcl.lisp") - (compile-system 'html-parser) - (load-system 'html-parser + (mk:compile-system 'html-parser) + (mk:load-system 'html-parser :compile-during-load () :load-source-if-no-binary t :bother-user-if-no-binary ())) @@ -164,7 +164,7 @@ (http:enable-http-service)) ;;; Example multi-processing setup. -#+(and MP nil) +#+mp (progn ;; Setup the event server timeout so that an interactive process can ;; act as the idle loop. diff -ru cl-http-70-156a-pre.orig/cmucl/w4/sysdcl.lisp cl-http-70-156a-pre/cmucl/w4/sysdcl.lisp --- cl-http-70-156a-pre.orig/cmucl/w4/sysdcl.lisp 1998-06-11 15:15:58.000000000 -0300 +++ cl-http-70-156a-pre/cmucl/w4/sysdcl.lisp 2002-10-08 22:09:52.000000000 -0300 @@ -4,7 +4,7 @@ (in-package "CL-USER") -(defsystem w4-web-walker +(mk:defsystem w4-web-walker :source-pathname "HTTP:" :components ("client;w4-client" ; W4 client support methods @@ -18,7 +18,7 @@ "w4;actions" ; Action definitions "w4;activity")) ; Activity definitions -(defsystem w4-web-walker-demo +(mk:defsystem w4-web-walker-demo :source-pathname "HTTP:" :components ("examples;configuration" ; Standard configuration diff -ru cl-http-70-156a-pre.orig/examples/log-window.lisp cl-http-70-156a-pre/examples/log-window.lisp --- cl-http-70-156a-pre.orig/examples/log-window.lisp 2002-11-02 18:31:55.000000000 -0200 +++ cl-http-70-156a-pre/examples/log-window.lisp 2002-11-02 18:25:44.000000000 -0200 @@ -329,10 +329,8 @@ (with-centering (:stream stream) (log-display-statistics-as-html-table log stream))))) (force-output stream) - #+multi-threaded (process-wait "Log Counter Refresh Wait" #'refresh-p log (+ (log-total-number-of-requests log) *log-window-statistics-refresh-rate*) stream) - #-multi-threaded (return) (unless (live-connection-p stream) (return)))) (error 'document-not-found :url url diff -ru cl-http-70-156a-pre.orig/examples/mail-archive.lisp cl-http-70-156a-pre/examples/mail-archive.lisp --- cl-http-70-156a-pre.orig/examples/mail-archive.lisp 2002-11-02 18:31:55.000000000 -0200 +++ cl-http-70-156a-pre/examples/mail-archive.lisp 2002-11-02 18:25:44.000000000 -0200 @@ -372,6 +372,7 @@ #+CLIM-SYS (eql (cl-user::search-wild "From *@*" line) 0)))) +#+Ignore (define-message-delimiter rmail (:prefix-delimitation-p t :documentation "Delimits messages in mail files written in Rmail format.") @@ -2092,8 +2093,7 @@ (flet ((name (class) (typecase class (symbol class) - (t #+CMU (pcl:class-name class) - #-CMU (class-name class))))) + (t (class-name class))))) (loop for super-class in (class-direct-superclasses class) for name = (name super-class) as sc = (class-superclasses super-class) Only in cl-http-70-156a-pre: log diff -ru cl-http-70-156a-pre.orig/lw/examples/configuration.lisp cl-http-70-156a-pre/lw/examples/configuration.lisp --- cl-http-70-156a-pre.orig/lw/examples/configuration.lisp 1997-07-07 01:19:24.000000000 -0300 +++ cl-http-70-156a-pre/lw/examples/configuration.lisp 2002-10-19 23:14:41.000000000 -0200 @@ -2,7 +2,7 @@ (in-package :HTTP) -(set-standard-http-port 8000) +(set-standard-http-port 8008) (setf (listening-on-http-ports) (list *standard-http-port*)) diff -ru cl-http-70-156a-pre.orig/server/html2.lisp cl-http-70-156a-pre/server/html2.lisp --- cl-http-70-156a-pre.orig/server/html2.lisp 2001-08-13 16:53:55.000000000 -0300 +++ cl-http-70-156a-pre/server/html2.lisp 2002-10-08 22:28:27.000000000 -0300 @@ -1544,7 +1544,7 @@ :type-arg "FILE" :lisp-type 'string) -(defparameter *file-upload-default-directory* #p"http:uploads;" +(defparameter *file-upload-default-directory* "http:uploads;" "The default directory to which files are uploaded files when posted via file upload.") (defvar *file-upload-directory-index-table* (make-hash-table :test #'equal)) diff -ru cl-http-70-156a-pre.orig/server/http-conditions.lisp cl-http-70-156a-pre/server/http-conditions.lisp --- cl-http-70-156a-pre.orig/server/http-conditions.lisp 2001-09-29 13:28:39.000000000 -0300 +++ cl-http-70-156a-pre/server/http-conditions.lisp 2002-10-08 22:41:12.000000000 -0300 @@ -423,7 +423,7 @@ (define-condition redirection (reportable-condition) ()) -(define-condition temporary-redirection (redirection) ()) +;(define-condition temporary-redirection (redirection) ()) (define-condition http/1.1-redirection-downgrade-mixin () ()) diff -ru cl-http-70-156a-pre.orig/server/utils.lisp cl-http-70-156a-pre/server/utils.lisp --- cl-http-70-156a-pre.orig/server/utils.lisp 2001-11-06 14:32:57.000000000 -0200 +++ cl-http-70-156a-pre/server/utils.lisp 2002-10-08 22:38:47.000000000 -0300 @@ -694,6 +694,7 @@ ;; Initialize the idle http process scavenger ;; This is a key feature for production servers and a security feature. +#+(or Genera MCL) (add-initialization "Synchronize Idle Connection Scavenger" '(www-utils::synchronize-idle-http-process-scavenger)