Skip to content

Commit

Permalink
whoops, actually add changes I thought I added in last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mtravers committed Jan 9, 2012
1 parent 5426f1e commit 29f9656
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1 +1,2 @@
CVS
*#
16 changes: 16 additions & 0 deletions README
@@ -1,3 +1,19 @@
README - github / mt version

This is a fork (in the loose sense) of the main version of Portable AllegroServe, which
seems kind of neglected. Original version may be found at:
http://portableaserve.sourceforge.net/

The first commit here represents the state of the Sourceforge version on 8-Jan-2012. Changes
since then are local (unless someone ports them back).

AllegroServe underlies the WuWei package of web development utilities, which might be of interest:
http://wuwei.name

Mike Travers

----------------------------------------------------------------

README --

This is a short description of what you will find
Expand Down
3 changes: 2 additions & 1 deletion aserve/log.cl
Expand Up @@ -127,7 +127,8 @@
(macrolet ((do-log ()
'(progn (format stream
"~a - - [~a] ~s ~s ~s~%"
(acl-compat.socket:ipaddr-to-dotted ipaddr)
(or (header-slot-value req :x-forwarded-for) ;+++ for EC2 UNTESTED
(acl-compat.socket:ipaddr-to-dotted ipaddr))
(maybe-universal-time-to-date time)
(request-raw-request req)
code
Expand Down
16 changes: 9 additions & 7 deletions aserve/main.cl
Expand Up @@ -586,19 +586,20 @@ Problems with protocol may occur." (ef-name ef)))))


(defmacro atomic-incf (var)
#+openmcl-native-threads
`(ccl::atomic-incf ,var)
;;; mt +++ these are giving me problems in Clozure Common Lisp Version 1.7-r14925M, so reverting to acl-compat version
; #+openmcl-native-threads
; `(ccl::atomic-incf ,var)
#+sbcl
`(acl-compat.mp::atomic-incf ,var)
#-(or openmcl-native-threads sbcl)
#-(or sbcl); openmcl-native-threads
`(acl-compat.mp:without-scheduling (incf ,var)))

(defmacro atomic-decf (var)
#+openmcl-native-threads
`(ccl::atomic-decf ,var)
; #+openmcl-native-threads
; `(ccl::atomic-decf ,var)
#+sbcl
`(acl-compat.mp::atomic-decf ,var)
#-(or openmcl-native-threads sbcl)
#-(or sbcl) ; openmcl-native-threads
`(acl-compat.mp:without-scheduling (decf ,var)))

(defun atomic-change-wserver-free-workers (server incf)
Expand Down Expand Up @@ -1713,7 +1714,8 @@ by keyword symbols and not by strings"
(return-from read-http-request nil))

; insert the host name and port into the uri
(let ((host (header-slot-value req :host)))
(let ((host (or (header-slot-value req :x-forwarded-server) ;mt addition for EC2 (+++UNTESTED+++)
(header-slot-value req :host))))
(if* host
then (let ((colonpos (find-it #\: host 0 (length host)))
(uri (request-uri req))
Expand Down

0 comments on commit 29f9656

Please sign in to comment.