From 43175d4fe36f91a28563a8cbf46160ee076de31c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 14 Jun 2010 08:33:55 +0000 Subject: tee_input: update documentation for Rack 1.2 Rack 1.2 removed the +size+ method requirement, but we'll still support it since Rack 1.2 doesn't _prohibit_ it, and Rack 1.[01] applications will continue to exist for a while. --- lib/unicorn/tee_input.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/unicorn/tee_input.rb b/lib/unicorn/tee_input.rb index 963414b..8ff7258 100644 --- a/lib/unicorn/tee_input.rb +++ b/lib/unicorn/tee_input.rb @@ -39,6 +39,12 @@ module Unicorn # For Transfer-Encoding:chunked requests, this requires consuming # all of the input stream before returning since there's no other # way to determine the size of the request body beforehand. + # + # This method is no longer part of the Rack specification as of + # Rack 1.2, so its use is not recommended. This method only exists + # for compatibility with Rack applications designed for Rack 1.1 and + # earlier. Most applications should only need to call +read+ with a + # specified +length+ in a loop until it returns +nil+. def size len and return len -- cgit v1.2.3-24-ge0c7