Skip to content

Commit

Permalink
bug25255: request-uri uses wrong scheme if ssl-args are used
Browse files Browse the repository at this point in the history
Changed the code so that wserver-ssl is set to the certificate path
regardless of the way in which it was provided.

Change-Id: Ibd6a5cc6bfc1590fa8b57cc294fd65b272c6ec1b
Reviewed-on: https://gerrit.franz.com:9080/10559
Reviewed-by: Tadeusz Sznuk <ts@franz.com>
Reviewed-by: Martin Mikelsons <mm@franz.com>
Reviewed-by: John Foderaro <jkf@franz.com>
Reviewed-by: Kevin Layer <layer@franz.com>
Tested-by: Kevin Layer <layer@franz.com>
  • Loading branch information
Tadeusz Sznuk authored and dklayer committed Apr 25, 2018
1 parent 45c00e8 commit 187d8c0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions main.cl
Expand Up @@ -21,7 +21,7 @@
#+ignore
(check-smp-consistency)

(defparameter *aserve-version* '(1 3 58))
(defparameter *aserve-version* '(1 3 59))

(eval-when (eval load)
(require :sock)
Expand Down Expand Up @@ -1462,7 +1462,7 @@ by keyword symbols and not by strings"
(setf (wserver-terminal-io server) *terminal-io*)
(setf (wserver-enable-chunking server) chunking)
(setf (wserver-enable-keep-alive server) keep-alive)
(setf (wserver-ssl server) ssl)
(setf (wserver-ssl server) (or ssl (getf ssl-args :certificate)))

#+unix
(if* os-processes
Expand Down
13 changes: 12 additions & 1 deletion test/t-aserve.cl
Expand Up @@ -300,6 +300,7 @@
(test-chunked-request-set-trailers port https)
(test-chunked-request-set-trailers-while-debugging port https)
(test-server-request-body port :https https)
(test-request-uri port https)

(if* (member :ics *features*)
then (test-international port)
Expand Down Expand Up @@ -2897,7 +2898,17 @@ Returns a vector."
(test nil (null (search "after 1510" b)))
)))


(defun test-request-uri (port https)
(publish :path "/request-uri" :content-type "text/plain"
:function
#'(lambda (req ent)
(with-http-response (req ent)
(with-http-body (req ent)
(net.uri:render-uri (request-uri req) *html-stream*)))))
(let* ((uri (format nil
"http~@[s~*~]://localhost:~a/request-uri" https port))
(result (x-do-http-request uri)))
(test uri result :test 'string=)))

(defun test-aserve-extra-ssl ()
;; tests run with no aserve server running
Expand Down

0 comments on commit 187d8c0

Please sign in to comment.