From 9fd299e6c44369c6e403158afd0610c0ab08bd66 Mon Sep 17 00:00:00 2001 From: Eitaro Fukamachi Date: Sat, 21 Mar 2015 02:11:20 +0900 Subject: [PATCH] Use :request-method and :request-uri in ENV like Clack does. --- README.md | 11 ++--------- src/request.lisp | 1 - 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 19f39ba..1551405 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Lack is an experimental project for redesigning Clack with performance and simpl The environment, an application takes, is a property list containing the following keys: -- `:method` (Required, Keyword) +- `:request-method` (Required, Keyword) - The HTTP request method: `:GET`, `:HEAD`, `:OPTIONS`, `:PUT`, `:POST`, or `:DELETE`. - `:script-name` (Required, String) - The initial portion of the request URI path that corresponds to the Clack application. The value of this key may be an empty string when the client is accessing the application represented by the server's root URI. Otherwise, it is a non-empty string starting with a forward slash (`/`). @@ -46,7 +46,7 @@ The environment, an application takes, is a property list containing the followi - The port on which the request is being handled. - `:server-protocol` (Required, Keyword) - The version of the protocol the client used to send the request: typically `:HTTP/1.0` or `:HTTP/1.1`. -- `:uri` (Required, String) +- `:request-uri` (Required, String) - The request URI. Always starts with "/". - `:raw-body` (Optional, Stream) - The new body of the request. @@ -57,13 +57,6 @@ The environment, an application takes, is a property list containing the followi - `:headers` (Required, Hash-Table) - A hash table of headers. -Old versions of Clack also had the following keys. These are now deprecated. - -- `:request-method` - - Use `:method` instead. -- `:request-uri` - - Use `:uri` instead. - ## The Response ### Normal response diff --git a/src/request.lisp b/src/request.lisp index 8b6d131..6c760ce 100644 --- a/src/request.lisp +++ b/src/request.lisp @@ -54,7 +54,6 @@ (defun make-request (env) (let ((req (apply #'%make-request :env env :allow-other-keys t env))) - ;; for backward-compatibility (with-slots (method uri) req (unless method (setf method (getf env :request-method)))