Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Rorschach committed Oct 21, 2009
2 parents 1865fc6 + cc55501 commit f7eb680
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 54 deletions.
40 changes: 40 additions & 0 deletions ChangeLog
Expand Up @@ -27,6 +27,36 @@
* parse.cl: compile in 8.1, 8.1+smp-macros, 8.2, 9.0
* proxy.cl: compile in 8.1, 8.1+smp-macros, 8.2, 9.0

2009-10-15 Marijn Haverbeke <marijnh@franz.com>

* test/t-aserve.cl: bug18668: fix http-copy-file test for SSL

2009-10-11 Kevin Layer <layer@gemini.franz.com>

* makefile: make 8.1 the default on Windows (like it is on UNIX)
* test/t-aserve.cl: tweak the http-copy-file tests to not
depend on being on the Franz local network, and to use the
server instance created during the tests

2009-10-08 Robert Rorschach <rfr@franz.com>
1.2.64

* macs.cl: track recent changes in the smp macros

* macs.cl: fix a package error in a macro; defvar-nonbindable
replaces defvar-nobind
* proxy.cl: restore a dropped #+ignore

2009-10-08 Kevin Layer <layer@gemini.franz.com>
1.2.63
(really from Marijn)
* main.cl: reduce warnings ("Maximum socket file descriptor...")

2009-10-05 Kevin Layer <layer@gemini.franz.com>
1.2.62
* main.cl: get-request-body: only call string-to-octets on
result if it's non-nil

2009-09-15 <layer@HOBART128>

* test/t-aserve.cl: fix test suite for Windows
Expand Down Expand Up @@ -63,6 +93,16 @@

* load.cl: remove removed files from *aserve-other-files*


2009-06-18 Robert Rorschach <rfr@franz.com>

* client.cl: compile in 8.1, 8.1+smp-macros, 8.2, 9.0
* examples/chat.cl: compile in 8.1, 8.1+smp-macros, 8.2, 9.0
* macs.cl: compile in 8.1, 8.1+smp-macros, 8.2, 9.0
* main.cl: compile in 8.1, 8.1+smp-macros, 8.2, 9.0; bump version
* parse.cl: compile in 8.1, 8.1+smp-macros, 8.2, 9.0
* proxy.cl: compile in 8.1, 8.1+smp-macros, 8.2, 9.0

2009-05-11 Kevin Layer <layer@gemini.franz.com>
1.2.59
* main.cl (request-query): rfe8332: make request-query-value
Expand Down
21 changes: 10 additions & 11 deletions main.cl
Expand Up @@ -22,9 +22,6 @@
;; http://www.gnu.org/copyleft/lesser.txt (until superseded by a newer
;; version) or write to the Free Software Foundation, Inc., 59 Temple Place,
;; Suite 330, Boston, MA 02111-1307 USA
;;
;;
;; $Id: main.cl,v 1.193 2009/02/19 12:34:19 jkf Exp $

;; Description:
;; aserve's main loop
Expand All @@ -41,7 +38,7 @@
#+ignore
(check-smp-consistency)

(defparameter *aserve-version* '(1 2 61))
(defparameter *aserve-version* '(1 2 64))

(eval-when (eval load)
(require :sock)
Expand Down Expand Up @@ -184,7 +181,8 @@


;; more specials
(defvar *max-socket-fd* 0) ; the maximum fd returned by accept-connection
(defvar *max-socket-fd* nil) ; set this to 0 to enable tracking and logging of
; the maximum fd returned by accept-connection
(defvar *aserve-debug-stream* nil) ; stream to which to seen debug messages
(defvar *debug-connection-reset-by-peer* nil) ; true to signal these too
(defvar *default-aserve-external-format* :latin1-base)
Expand Down Expand Up @@ -1330,11 +1328,12 @@ by keyword symbols and not by strings"

; another useful test to see if we're losing file
; descriptors
(let ((fd (excl::stream-input-fn sock)))
(if* (> fd *max-socket-fd*)
then (setq *max-socket-fd* fd)
(logmess (format nil
"Maximum socket file descriptor number is now ~d" fd))))
(when *max-socket-fd*
(let ((fd (excl::stream-input-fn sock)))
(if* (> fd *max-socket-fd*)
then (setq *max-socket-fd* fd)
(logmess (format nil
"Maximum socket file descriptor number is now ~d" fd)))))


(setq error-count 0) ; reset count
Expand Down Expand Up @@ -1651,7 +1650,7 @@ by keyword symbols and not by strings"
(or (request-request-body req)
(setf (request-request-body req)
(get-request-body-retrieve req)))))
(if* ef-supplied ; spr27296
(if* (and ef-supplied result) ; spr27296
then (values
(octets-to-string
(string-to-octets result :external-format :octets)
Expand Down
4 changes: 1 addition & 3 deletions makefile
@@ -1,5 +1,3 @@
# $Id: makefile,v 1.15 2008/02/17 06:16:54 layer Exp $
#
# On Windows, this makefile requires the use of GNU make from Redhat
# (http://sources.redhat.com/cygwin/).

Expand All @@ -15,7 +13,7 @@ endif

ifndef mlisp
ifeq ($(on_windows),yes)
mlisp = "/cygdrive/c/Program Files/acl80/mlisp.exe" +B +cn
mlisp = "/cygdrive/c/Program Files/acl81/mlisp.exe" +B +cn
else
mlisp = /fi/cl/8.1/bin/mlisp
endif
Expand Down
12 changes: 4 additions & 8 deletions proxy.cl
Expand Up @@ -89,7 +89,7 @@
(defparameter *connections-used-cached* 0) ; number of cached connections used
; the cache
(defparameter *connection-cache-queue* (cons nil nil)) ; (first . last) queue of conn-cache objects
(defparameter *connection-cache-expire* 10) ; number of seconds to live
(defparameter *connection-cache-expire* 10) ; number of seconds to live

(defparameter *connection-cache-lock*
(smp-case
Expand Down Expand Up @@ -1906,7 +1906,7 @@ cached connection = ~s~%" cond cached-connection))
(let ((queueobj (pcache-ent-queueobj pcache-ent)))
(move-pcache-ent pcache-ent queueobj queueobj)))

#+ignore ;; an old non-thread-safe version, replaced below
#+ignore ;; fixed below for thread safety
(defun move-pcache-ent (pcache-ent fromq toq)
;; move the pcache-ent between queues
;; fromq and toq can be nil or the same.
Expand Down Expand Up @@ -2021,9 +2021,6 @@ cached connection = ~s~%" cond cached-connection))






(defun kill-pcache-ent (pcache-ent &optional (pcache (wserver-pcache
*wserver*)))
; make this entry dead
Expand Down Expand Up @@ -2270,8 +2267,7 @@ cached connection = ~s~%" cond cached-connection))

(loop
(if* (<= needed 0) then (return))

#+ignore ;; replaced below
#+ignore ;; recoded below
(block main
(setq ent-todo nil)

Expand Down Expand Up @@ -2465,7 +2461,7 @@ cached connection = ~s~%" cond cached-connection))
; to the value before we set the flag.
; If the value was nil and thus we set it to true, then
; we are the process responsible for loading in the data
;
;
#-smp
(let ((flagval (atomically-fast
(let ((val (pcache-ent-loading-flag pcache-ent)))
Expand Down
72 changes: 40 additions & 32 deletions test/t-aserve.cl
Expand Up @@ -93,7 +93,7 @@
(test-forms port)
(test-client port)
(test-cgi port)
(test-http-copy-file)
(test-http-copy-file port)
(test-client-unicode-content-length)
(if* (member :ics *features*)
then (test-international port)
Expand Down Expand Up @@ -1791,37 +1791,45 @@
:external-format (crlf-base-ef :utf8) :keep-alive t :timeout 3)
(shutdown :server server)))

(defun test-http-copy-file ()
(let ((url
"http://www.franz.com/support/8.0/download/entpro/dist/windows/acl80.exe")
(reference-file
"/fi/www/sites/franz/prod/htdocs/support/8.0/download/entpro/dist/windows/acl80.exe")
(temp-file-name (sys:make-temp-file-name "temp")))
(when (not (probe-file reference-file))
(format t "test-http-copy-file: reference file does not exist.~%")
(return-from test-http-copy-file))
(unwind-protect
(flet ((doit (&rest args)
(format t "~&~%copying reference file~@[:~{ ~s~}~]~%"
args)
(let ((before (get-internal-real-time)))
(apply #'http-copy-file url temp-file-name args)
(format t "time = ~s msecs~%"
(- (get-internal-real-time) before)))
(format t "comparing ~a~%" temp-file-name)
(test t (excl::compare-files reference-file temp-file-name))
(delete-file temp-file-name)))
(doit)
(doit :protocol :http/1.0)
(doit :buffer-size 2048)
(doit :buffer-size 4096)
(doit :buffer-size 8192)
(doit
:progress-function
(lambda (bytes-read total-size)
(format t "~& copy progress: ~a ~a~%" bytes-read total-size)
(force-output t))))
(ignore-errors (delete-file temp-file-name)))))
(defun test-http-copy-file (port)
(let* ((reference-files '("sys:files.bu"
"sys:runtime.bu"
"sys:mlisp.dxl"
"sys:mlisp8.dxl"
"sys:alisp.dxl"
"sys:alisp8.dxl"
"sys:dcl.dxl"))
(url (format nil "http~a://localhost:~a/http-copy-file" (if *x-ssl* "s" "") port))
(temp-file-name (sys:make-temp-file-name "temp")))

(dolist (reference-file reference-files)
(when (probe-file reference-file)
(format t "~&~%======= test-http-copy-file: ~a~%" reference-file)
(publish-file :path "/http-copy-file" :file reference-file
:content-type "application/octet-stream")
(unwind-protect
(labels
((progress (bytes-read total-size)
(format t "~& copy progress: ~a ~a~%" bytes-read total-size)
(force-output t))
(doit (&rest args)
(format t "~&~%copying reference file~@[:~{ ~a~}~]~%"
args)
(let ((before (get-internal-real-time)))
(apply #'http-copy-file url temp-file-name args)
(format t "time = ~s msecs~%"
(- (get-internal-real-time) before)))
(format t "comparing ~a~%" temp-file-name)
(test t (excl::compare-files reference-file temp-file-name))
(delete-file temp-file-name)))
(doit :progress-function #'progress)
;;*** no need to do this so many times:
;;(doit)
;;(doit :buffer-size 2048)
;;(doit :buffer-size 4096)
(doit :buffer-size 8192)
(doit :protocol :http/1.0))
(ignore-errors (delete-file temp-file-name)))))))


(if* user::*do-aserve-test*
Expand Down

0 comments on commit f7eb680

Please sign in to comment.