README: document $env support for reading Rack env
authorEric Wong <normalperson@yhbt.net>
Thu, 14 Aug 2014 19:44:09 +0000 (14 19:44 +0000)
committerEric Wong <normalperson@yhbt.net>
Thu, 14 Aug 2014 19:44:09 +0000 (14 19:44 +0000)
This is more portable across different servers than Thread.current
in case of non-blocking servers which may be serving multiple
clients at once.  This is also faster than relying on $e{...} since
$e{...} uses eval and that is slow.

README

diff --git a/README b/README
index e125b6f..74c8185 100644 (file)
--- a/README
+++ b/README
@@ -88,6 +88,7 @@ that receives a "<<" method:
 * $pid - process ID of the current process
 * $e{Thread.current} - Thread processing the request
 * $e{Actor.current} - Actor processing the request (Revactor or Rubinius)
+* $env{variable_name} - any Rack environment variable (e.g. rack.url_scheme)
 
 == REQUIREMENTS