Permalink
Switch branches/tags
save2011_02_16 release10.1_t6 release10.1_t5 release10.1_t4 release10.1_t3 release10.1_t2 release10.1_t1 release10.1_release_point release10.1_rc5 release10.1_rc4 release10.1_rc3 release10.1_rc2 release10.1_rc1 release10.1_beta3_release_point release10.1.beta2_release_point release10.1.beta_t6 release10.1.beta_t5 release10.1.beta_t4 release10.1.beta_t3 release10.1.beta_t2 release10.1.beta_t1 release10.1.beta_release_point release10.1.beta_rc4 release10.1.beta_rc3 release10.1.beta_rc2 release10.1.beta_rc1 release10.0_t3 release10.0_t2 release10.0_t1 release10.0_rc9 release10.0_rc8 release10.0_rc7 release10.0_rc6 release10.0_rc5 release10.0_rc4 release10.0_rc3 release10.0_rc2 release10.0_rc1 release10.0.pre-final.30_release_point release10.0.pre-final.17_release_point release10.0.beta_t13 release10.0.beta_t12 release10.0.beta_t11 release10.0.beta_t10 release10.0.beta_t9 release10.0.beta_t8 release10.0.beta_t7 release10.0.beta_t6 release10.0.beta_t5 release10.0.beta_t4 release10.0.beta_t3 release10.0.beta_t2 release10.0.beta_t1 release10.0.beta_release_point release10.0.beta_rc2 release10.0.beta_rc1 release_aclt2 release_acl100b14t8 release_acl100b11t7 release_acl100b10t6 release_acl100b8t5 release_acl100b7t4 release_acl100b6t3 release_acl100b4t2 release_acl100b2t1 release_acl90b21rc5 release_acl90b20_release_point release_acl90b20rc4 release_acl90b19rc3 release_acl90b18rc2 release_acl90b15_release_point release_acl90b15rc1 release_acl90b13t1 release_acl90b11t1 release_acl90b9t1 release_acl90b8t1 release_acl90b6_release_point release_acl90b6rc2 release_acl90b_release_point release_acl90a52rc1 release_acl90a44rc2 release_acl90a43rc1 release_acl90a39 release_acl90a39rc2 release_acl90a32 release_acl90a27 release_acl90a25 release_acl90a24 release_acl90a23 release_acl90a20 release_acl90a18 install-spider_2013-04-26T12-55-31 install-spider_2013-04-25T12-56-58 install-spider_2013-04-24T16-52-55 install-spider_2013-04-24T16-42-42 install-spider_2013-04-24T16-29-36 install-spider_2013-04-24T15-47-16 install-spider_2013-04-24T15-37-01 install-spider_2013-04-24T15-02-09 install-spider_2013-04-23T11-10-35
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
289 lines (267 sloc) 8.6 KB
;; -*- mode: common-lisp; package: net.aserve -*-
;;
;; packages.cl
;;
;; See the file LICENSE for the full license governing this code.
#+(version= 10 1)
(sys:defpatch "aserve" 4
"v4: 1.3.52: optimize compilation for speed;
v3: 1.3.51 add get-request-body-incremental;
v2: 1.3.50: define deflate-stream methods all the time;
v1: 1.3.49: speed up read-sock-line."
:type :system
:post-loadable t)
#+(version= 10 0)
(sys:defpatch "aserve" 15
"v15: 1.3.52: optimize compilation for speed;
v14: 1.3.51 add get-request-body-incremental;
v13: 1.3.50: define deflate-stream methods all the time;
v12: 1.3.49: speed up read-sock-line;
v11: 1.3.45 - avoid races in constructor initialization;
v10: no version change, fix defpatch;
v9: 1.3.44: add :test-ssl argument to start function;
v8: 1.3.43: don't log when client closes connection early;
v7: 1.3.42: internal improvements to server body access;
v6: 1.3.41: fix multi-directory clp file rewriting;
v5: 1.3.40: add methods for socket-bytes-read|written;
v4: 1.3.39: workaround for a bug in decoding chunked request bodies over ssl.
v3: 1.3.38: call make-ssl-client-stream with :method instead of :ssl-method;
v2: 1.3.37: add trailer support
v1: 1.3.36: cosmetic: bump version #; code same as 10.0 initial release."
:type :system
:post-loadable t)
#+(version= 9 0)
(sys:defpatch "aserve" 22
"v22: 1.3.52: optimize compilation for speed;
v21: 1.3.50: define deflate-stream methods all the time;
v20: 1.3.38: call make-ssl-client-stream with :method instead of :ssl-method;
v19: 1.3.37: add trailer support
v18: 1.3.36: add http-only cookies;
v17: 1.3.35: add max-listeners arg to net.aserve:start. Increase max header size to 8192;
v16: 1.3.33: speed up serving of files;
v15: 1.3.32: add no-proxy argument to do-http-request. Fix buggy argument checking for ssl arguments ;
v14: 1.3.30: For https, use defaults of the underlying ssl module;
v13: 1.3.29: proxy now returns content-length;
v12: 1.3.28: Fix bug in retry-on-timeout code in do-http-request;
v11: 1.3.28: Have server send a 408 Request Timeout response on timeout instead of closing connection. Allow client to auto-retry;
v10: 1.3.27: Make clients reading a chunked response detect an unexpected eof instead of busy looping;
v9: 1.3.26: Make do-http-request merge the query part of the uri of requests with the query argument;
v8: 1.3.25: fix keep-alive timeout header: use wserver-header-read-timeout instead of wserver-read-request-timeout;
v7: 1.3.24: Move 100-continue expectation handling until after authorization and an entity has been found. Allow disabling of auto handling per entity;
v6: 1.3.23: fixes socket leak in client when the the writing of the initial headers and body fails;
v5: 1.3.21: new proxy control;
v4: 1.3.20: handle connection reset and aborted errors properly in the client;
v3: add timeout for reading request header;
v2: 1.3.18: introduce allegroserve-error condition object, fix compression with logical pathnames;
v1: 1.3.16: fix freeing freed buffer."
:type :system
:post-loadable t)
;; Description:
;; packages and exports for AllegroServe
;;
;;- This code in this file obeys the Lisp Coding Standard found in
;;- http://www.franz.com/~jkf/coding_standards.html
;;-
; note: net.html.generator is not defined here since that's a
; standalone package
;
(in-package :user)
(eval-when (compile) (declaim (optimize (speed 3))))
(eval-when (compile load eval)
(require :osi)
(require :autozoom)
(require :uri)
#-(and allegro (version>= 6))
(require :streamc)
(require :inflate))
(eval-when (compile load eval)
(defvar sys::*user-warned-about-deflate* nil)
(handler-case (require :deflate)
(error (c)
(if* (null sys::*user-warned-about-deflate*)
then (format t "~&NOTE: ~@<the deflate module could not be loaded, so ~
server compression is disabled. AllegroServe is completely functional ~
without compression. Original error loading deflate was:~%~a~%~:@>" c)
(setq sys::*user-warned-about-deflate* t)))))
(defpackage :net.aserve
(:use :common-lisp :excl :net.html.generator :net.uri :util.zip)
(:export
#:allegroserve-error
#:allegroserve-error-action
#:allegroserve-error-result
#:allegroserve-error-identifier
#:authorize
#:authorize-proxy-request
#:authorizer
#:base64-decode
#:base64-encode
#:can-set-trailers-p
#:chunking-stream-trailers
#:compute-strategy
#:computed-entity
;; don't export, these should be private
; #:debug-off
; #:debug-on
#:denied-request
#:enable-proxy
#:ensure-stream-lock
#:entity-plist
#:failed-request
#:form-urlencoded-to-query
#:function-authorizer ; class
#:function-authorizer-function
#:get-basic-authorization
#:get-cookie-values
#:get-all-multipart-data
#:get-multipart-header
#:get-multipart-sequence
#:get-request-body
#:get-request-body-incremental
#:handle-request
#:handle-uri ; add-on component..
#:header-slot-value
#:http-request ; class
#:locator ; class
#:location-authorizer ; class
#:location-authorizer-patterns
#:map-entities
#:parse-multipart-header
#:password-authorizer ; class
#:process-entity
#:proxy-control ; class
#:proxy-control-location
#:proxy-control-destinations
#:publish
#:publish-file
#:publish-directory
#:publish-multi
#:publish-prefix
#:query-to-form-urlencoded
#:reply-header-slot-value
#:run-cgi-program
#:set-basic-authorization
#:set-trailers
#:standard-locator
#:unpublish-locator
#:vhost
#:vhost-log-stream
#:vhost-error-stream
#:vhost-names
#:vhost-plist
#:request-method
#:request-protocol
#:request-protocol-string
#:request-query
#:request-query-value
#:request-raw-request
#:request-raw-uri
#:request-socket
#:request-uri
#:request-variable-value
#:request-wserver
#:request-reply-code
#:request-reply-date
#:request-reply-content-length
#:request-reply-content-type
#:request-reply-plist
#:request-reply-protocol-string
#:request-reply-strategy
#:request-reply-stream
#:request-has-continue-expectation
#:send-100-continue
#:set-cookie-header
#:shutdown
#:split-into-words
#:start
#:unchunking-trailers
#:uridecode-string
#:uriencode-string
#:unpublish
#:url-argument
#:url-argument-alist
#:with-http-response
#:with-http-body
#:wserver
#:wserver-default-vhost
#:wserver-enable-chunking
#:wserver-enable-keep-alive
#:wserver-external-format
#:wserver-filters
#:wserver-header-read-timeout
#:wserver-locators
#:wserver-io-timeout
#:wserver-log-function
#:wserver-log-stream
#:wserver-response-timeout
#:wserver-socket
#:wserver-vhosts
#:log-for-wserver
#:*aserve-version*
#:*default-aserve-external-format*
#:*http-header-read-timeout*
#:*http-io-timeout*
#:*http-response-timeout*
#:*mime-types*
#:*response-continue*
#:*response-ok*
#:*response-created*
#:*response-accepted*
#:*response-non-authoritative-information*
#:*response-no-content*
#:*response-partial-content*
#:*response-moved-permanently*
#:*response-found*
#:*response-see-other*
#:*response-not-modified*
#:*response-temporary-redirect*
#:*response-bad-request*
#:*response-unauthorized*
#:*response-not-found*
#:*response-method-not-allowed*
#:*response-request-timeout*
#:*response-requested-range-not-satisfiable*
#:*response-expectation-failed*
#:*response-internal-server-error*
#:*response-not-implemented*
#:*wserver*))
(defpackage :net.aserve.client
(:use :net.aserve :excl :common-lisp)
(:export
#:client-request ; class
#:client-request-close
#:client-request-cookies
#:client-request-headers
#:client-request-protocol
#:client-request-read-sequence
#:client-request-response-code
#:client-request-response-comment
#:client-request-socket
#:client-request-uri
#:client-response-header-value
#:read-response-body
#:compute-digest-authorization
#:cookie-item
#:cookie-item-expires
#:cookie-item-http-only
#:cookie-item-name
#:cookie-item-path
#:cookie-item-secure
#:cookie-item-value
#:cookie-jar ; class
#:digest-authorization
#:digest-password
#:digest-realm
#:digest-username
#:do-http-request
#:http-copy-file
#:make-http-client-request
#:read-client-response-headers
))
;; These functions must be undefined in case new aserve is loaded on
;; top of older aserve in 8.1. [bug23328]
#+(version= 8 1)
(eval-when (compile load eval)
(fmakunbound 'net.aserve::logmess)
(fmakunbound 'net.aserve::logmess-stream)
(fmakunbound 'net.aserve.client::read-client-response-headers)
)