Browse files

fixed a bug that Clack wouldn't run on port 80.

  • Loading branch information...
1 parent c0696ff commit 1a7c3aca6d909a2566da5640fcc4a79ad624cb12 @fukamachi committed Jun 13, 2011
Showing with 4 additions and 3 deletions.
  1. +3 −2 src/core/handler/apache.lisp
  2. +1 −1 src/core/handler/hunchentoot.lisp
View
5 src/core/handler/apache.lisp
@@ -49,8 +49,9 @@ This function is called on each request."
(defun command->plist (command)
(bind ((url (ml:header-value command :url))
(pos (position #\? url))
- ((server-name server-port)
- (split-sequence #\: (ml:header-value command :host))))
+ ((server-name &optional (server-port "80"))
+ (split-sequence #\: (ml:header-value command :host)
+ :from-end t)))
(append
(list
:request-method (ml:header-value command :method)
View
2 src/core/handler/hunchentoot.lisp
@@ -97,7 +97,7 @@ before pass to Hunchentoot."
(defun request->plist (req)
"Convert Request from server into a plist
before pass to Clack application."
- (destructuring-bind (server-name server-port)
+ (destructuring-bind (server-name &optional (server-port "80"))
(split-sequence #\: (host req) :from-end t)
(append
(list

0 comments on commit 1a7c3ac

Please sign in to comment.