Permalink
Browse files

obey keep-alive requests for PUT and POST requests. Aserve version 1.…

…2.68

see bug19575

Change-Id: Ica3f7882e4b3e76c722262d61e3881ac71605425
  • Loading branch information...
John Foderaro authored and dklayer committed Aug 10, 2010
1 parent d547b19 commit 798202ab62d8bac550aa790d2cfac3f642379502
Showing with 11 additions and 16 deletions.
  1. +2 −4 main.cl
  2. +9 −12 publish.cl
View
@@ -38,7 +38,7 @@
#+ignore
(check-smp-consistency)
(defparameter *aserve-version* '(1 2 67))
(defparameter *aserve-version* '(1 2 68))
(eval-when (eval load)
(require :sock)
@@ -1742,9 +1742,7 @@ by keyword symbols and not by strings"
else ; no content length given
(if* (equalp "keep-alive"
(header-slot-value req
:connection))
(if* (keep-alive-specified req)
then ; must be no body
""
else ; read until the end of file
View
@@ -1496,7 +1496,7 @@
;; the lastmod value we just calculated shows
;; that the file hasn't changed since the browser
;; last grabbed it.
(setf (request-reply-content-length req) size)
(setf (reply-header-slot-value req :last-modified)
(last-modified-string ent))
@@ -2111,6 +2111,12 @@
)))))
(defun keep-alive-specified (req)
(if* (eq (request-protocol req) :http/1.1)
then (not (header-value-member
"close" (header-slot-value req :connection)))
else (header-value-member
"keep-alive" (header-slot-value req :connection))))
(defmethod compute-strategy ((req http-request) (ent entity) format)
@@ -2120,11 +2126,7 @@
(keep-alive-possible
(and (wserver-enable-keep-alive *wserver*)
(>= (wserver-free-workers *wserver*) 2)
(if* (eq (request-protocol req) :http/1.1)
then (not (header-value-member
"close" (header-slot-value req :connection)))
else (header-value-member
"keep-alive" (header-slot-value req :connection))))))
(keep-alive-specified req))))
(if* (eq (request-method req) :head)
then ; head commands are particularly easy to reply to
@@ -2183,12 +2185,7 @@
(declare (ignore format))
(let ((keep-alive (and (wserver-enable-keep-alive *wserver*)
(>= (wserver-free-workers *wserver*) 2)
(if* (eq (request-protocol req) :http/1.1)
then (not (header-value-member
"close" (header-slot-value req :connection)))
else (header-value-member
"keep-alive" (header-slot-value req :connection)))
))
(keep-alive-specified req)))
(strategy))
(if* (eq (request-method req) :get)

0 comments on commit 798202a

Please sign in to comment.