<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -2,7 +2,7 @@ module Rack
   # Rack::CommonLogger forwards every request to an +app+ given, and
   # logs a line in the Apache common log format to the +logger+, or
   # rack.errors by default.
-  
+
   class CommonLogger
     def initialize(app, logger=nil)
       @app = app</diff>
      <filename>lib/rack/commonlogger.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@ module Rack
   #
   # Handlers can detect if bodies are a Rack::File, and use mechanisms
   # like sendfile on the +path+.
-  
+
   class File
     attr_accessor :root
     attr_accessor :path</diff>
      <filename>lib/rack/file.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@ module Rack
       def self.run(app, options=nil)
         serve app
       end
-      
+
       def self.serve(app)
         env = ENV.to_hash
         env.delete &quot;HTTP_CONTENT_LENGTH&quot;
@@ -14,18 +14,18 @@ module Rack
         env.update({&quot;rack.version&quot; =&gt; [0,1],
                      &quot;rack.input&quot; =&gt; STDIN,
                      &quot;rack.errors&quot; =&gt; STDERR,
-                     
+
                      &quot;rack.multithread&quot; =&gt; false,
                      &quot;rack.multiprocess&quot; =&gt; true,
                      &quot;rack.run_once&quot; =&gt; true,
-                     
+
                      &quot;rack.url_scheme&quot; =&gt; [&quot;yes&quot;, &quot;on&quot;, &quot;1&quot;].include?(ENV[&quot;HTTPS&quot;]) ? &quot;https&quot; : &quot;http&quot;
                    })
-        
+
         env[&quot;QUERY_STRING&quot;] ||= &quot;&quot;
         env[&quot;HTTP_VERSION&quot;] ||= env[&quot;SERVER_PROTOCOL&quot;]
         env[&quot;REQUEST_PATH&quot;] ||= &quot;/&quot;
-        
+
         status, headers, body = app.call(env)
         begin
           send_headers status, headers
@@ -34,7 +34,7 @@ module Rack
           body.close  if body.respond_to? :close
         end
       end
-      
+
       def self.send_headers(status, headers)
         STDOUT.print &quot;Status: #{status}\r\n&quot;
         headers.each { |k, vs|
@@ -45,7 +45,7 @@ module Rack
         STDOUT.print &quot;\r\n&quot;
         STDOUT.flush
       end
-      
+
       def self.send_body(body)
         body.each { |part|
           STDOUT.print part</diff>
      <filename>lib/rack/handler/cgi.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,31 +11,31 @@ module Rack
         yield server  if block_given?
         server.run.join
       end
-      
+
       def initialize(app)
         @app = app
       end
-      
+
       def process(request, response)
         env = {}.replace(request.params)
         env.delete &quot;HTTP_CONTENT_TYPE&quot;
         env.delete &quot;HTTP_CONTENT_LENGTH&quot;
 
         env[&quot;SCRIPT_NAME&quot;] = &quot;&quot;  if env[&quot;SCRIPT_NAME&quot;] == &quot;/&quot;
-        
+
         env.update({&quot;rack.version&quot; =&gt; [0,1],
                      &quot;rack.input&quot; =&gt; request.body || StringIO.new(&quot;&quot;),
                      &quot;rack.errors&quot; =&gt; STDERR,
-                     
+
                      &quot;rack.multithread&quot; =&gt; true,
                      &quot;rack.multiprocess&quot; =&gt; false, # ???
                      &quot;rack.run_once&quot; =&gt; false,
-                     
+
                      &quot;rack.url_scheme&quot; =&gt; &quot;http&quot;,
                    })
         env[&quot;QUERY_STRING&quot;] ||= &quot;&quot;
         env.delete &quot;PATH_INFO&quot;  if env[&quot;PATH_INFO&quot;] == &quot;&quot;
-        
+
         status, headers, body = @app.call(env)
 
         begin</diff>
      <filename>lib/rack/handler/mongrel.rb</filename>
    </modified>
    <modified>
      <diff>@@ -11,27 +11,27 @@ module Rack
         yield server  if block_given?
         server.start
       end
-      
+
       def initialize(server, app)
         super server
         @app = app
       end
-      
+
       def service(req, res)
         env = req.meta_vars
         env.delete_if { |k, v| v.nil? }
-        
+
         env.update({&quot;rack.version&quot; =&gt; [0,1],
                      &quot;rack.input&quot; =&gt; StringIO.new(req.body.to_s),
                      &quot;rack.errors&quot; =&gt; STDERR,
-                     
+
                      &quot;rack.multithread&quot; =&gt; true,
                      &quot;rack.multiprocess&quot; =&gt; false,
                      &quot;rack.run_once&quot; =&gt; false,
-                     
+
                      &quot;rack.url_scheme&quot; =&gt; [&quot;yes&quot;, &quot;on&quot;, &quot;1&quot;].include?(ENV[&quot;HTTPS&quot;]) ? &quot;https&quot; : &quot;http&quot;
                    })
-        
+
         env[&quot;HTTP_VERSION&quot;] ||= env[&quot;SERVER_PROTOCOL&quot;]
         env[&quot;QUERY_STRING&quot;] ||= &quot;&quot;
         env[&quot;REQUEST_PATH&quot;] ||= &quot;/&quot;</diff>
      <filename>lib/rack/handler/webrick.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 module Rack
   # Rack::Lint validates your application and the requests and
   # responses according to the Rack spec.
-  
+
   class Lint
     def initialize(app)
       @app = app
@@ -47,7 +47,7 @@ module Rack
       check_content_type status, headers
       [status, headers, self]
     end
-    
+
     ## == The Environment
     def check_env(env)
       ## The environment must be an true instance of Hash (no
@@ -210,7 +210,7 @@ module Rack
       def initialize(input)
         @input = input
       end
-      
+
       ## * +gets+ must be called without arguments and return a string,
       ##   or +nil+ on EOF.
       def gets(*args)</diff>
      <filename>lib/rack/lint.rb</filename>
    </modified>
    <modified>
      <diff>@@ -21,14 +21,14 @@ module Rack
         lobster = LobsterString
         href = &quot;?flip&quot;
       end
-      
+
       [200, {&quot;Content-Type&quot; =&gt; &quot;text/html&quot;},
        [&quot;&lt;title&gt;Lobstericious!&lt;/title&gt;&quot;,
         &quot;&lt;pre&gt;&quot;, lobster, &quot;&lt;/pre&gt;&quot;,
         &quot;&lt;a href='#{href}'&gt;flip!&lt;/a&gt;&quot;]
       ]
     }
-    
+
     def call(env)
       req = Request.new(env)
       if req.GET[&quot;flip&quot;] == &quot;left&quot;
@@ -42,7 +42,7 @@ module Rack
         lobster = LobsterString
         href = &quot;?flip=left&quot;
       end
-      
+
       Response.new.finish do |res|
         res.write &quot;&lt;title&gt;Lobstericious!&lt;/title&gt;&quot;
         res.write &quot;&lt;pre&gt;&quot;</diff>
      <filename>lib/rack/lobster.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@ module Rack
   # &lt;tt&gt;:input&lt;/tt&gt;:: A String or IO-like to be used as rack.input.
   # &lt;tt&gt;:fatal&lt;/tt&gt;:: Raise a FatalWarning if the app writes to rack.errors.
   # &lt;tt&gt;:lint&lt;/tt&gt;:: If true, wrap the application in a Rack::Lint.
-  
+
   class MockRequest
     class FatalWarning &lt; RuntimeError
     end</diff>
      <filename>lib/rack/mock.rb</filename>
    </modified>
    <modified>
      <diff>@@ -28,7 +28,7 @@ module Rack
   # include data from other applications (by using
   # &lt;tt&gt;rack['rack.recursive.include'][...]&lt;/tt&gt; or raise a
   # ForwardRequest to redirect internally.
-  
+
   class Recursive
     def initialize(app)
       @app = app</diff>
      <filename>lib/rack/recursive.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ module Rack
   # rack.errors.
   #
   # It is recommended you use ShowExceptions to catch SyntaxErrors etc.
-  
+
   class Reloader
     def initialize(app, secs=10)
       @app = app</diff>
      <filename>lib/rack/reloader.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,11 +8,11 @@ module Rack
   #   req = Rack::Request.new(env)
   #   req.post?
   #   req.params[&quot;data&quot;]
-  
+
   class Request
     # The environment of the request.
     attr_reader :env
-    
+
     def initialize(env)
       @env = env
     end
@@ -59,7 +59,7 @@ module Rack
       else
         @env[&quot;rack.request.form_input&quot;] = @env[&quot;rack.input&quot;]
         unless @env[&quot;rack.request.form_hash&quot;] =
-            Utils::Multipart.parse_multipart(env) 
+            Utils::Multipart.parse_multipart(env)
           @env[&quot;rack.request.form_vars&quot;] = @env[&quot;rack.input&quot;].read
           @env[&quot;rack.request.form_hash&quot;] = Utils.parse_query(@env[&quot;rack.request.form_vars&quot;])
         end</diff>
      <filename>lib/rack/request.rb</filename>
    </modified>
    <modified>
      <diff>@@ -120,36 +120,36 @@ module Rack
 
     module Helpers
       def invalid?;       @status &lt; 100 || @status &gt;= 600;       end
-      
+
       def informational?; @status &gt;= 100 &amp;&amp; @status &lt; 200;       end
       def successful?;    @status &gt;= 200 &amp;&amp; @status &lt; 300;       end
       def redirection?;   @status &gt;= 300 &amp;&amp; @status &lt; 400;       end
       def client_error?;  @status &gt;= 400 &amp;&amp; @status &lt; 500;       end
       def server_error?;  @status &gt;= 500 &amp;&amp; @status &lt; 600;       end
-      
+
       def ok?;            @status == 200;                        end
       def forbidden?;     @status == 403;                        end
       def not_found?;     @status == 404;                        end
-      
+
       def redirect?;      [301, 302, 303, 307].include? @status; end
       def empty?;         [201, 204, 304].include?      @status; end
-      
+
       # Headers
       attr_reader :headers, :original_headers
-      
+
       def include?(header)
         !!headers[header]
       end
-      
+
       def content_type
         headers[&quot;Content-Type&quot;]
       end
-      
+
       def content_length
         cl = headers[&quot;Content-Length&quot;]
         cl ? cl.to_i : cl
       end
-      
+
       def location
         headers[&quot;Location&quot;]
       end</diff>
      <filename>lib/rack/response.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,10 +2,10 @@ require 'base64'
 
 module Rack
 
-  module Session        
+  module Session
 
     # Rack::Session::Cookie provides simple cookie based session management.
-    # The session is a Ruby Hash stored as base64 encoded marshalled data 
+    # The session is a Ruby Hash stored as base64 encoded marshalled data
     # set to :key (default: rack.session).
     #
     # Example:
@@ -22,54 +22,52 @@ module Rack
       def initialize(app, options={})
         @app = app
         @key = options[:key] || &quot;rack.session&quot;
-        @default_options = {:domain =&gt; nil, 
-          :path =&gt; &quot;/&quot;, 
+        @default_options = {:domain =&gt; nil,
+          :path =&gt; &quot;/&quot;,
           :expire_after =&gt; nil}.merge(options)
-        end
-
-        def call(env)
-          load_session(env)
-          status, headers, body = @app.call(env)
-          commit_session(env, status, headers, body)
-        end
+      end
 
-        private
+      def call(env)
+        load_session(env)
+        status, headers, body = @app.call(env)
+        commit_session(env, status, headers, body)
+      end
 
-        def load_session(env)
-          request = Rack::Request.new(env)
-          session_data = request.cookies[@key]
+      private
 
-          begin
-            session_data = Base64.decode64(session_data)
-            session_data = Marshal.load(session_data)
-            env[&quot;rack.session&quot;] = session_data
-          rescue
-            env[&quot;rack.session&quot;] = Hash.new
-          end
+      def load_session(env)
+        request = Rack::Request.new(env)
+        session_data = request.cookies[@key]
 
-          env[&quot;rack.session.options&quot;] = @default_options.dup
+        begin
+          session_data = Base64.decode64(session_data)
+          session_data = Marshal.load(session_data)
+          env[&quot;rack.session&quot;] = session_data
+        rescue
+          env[&quot;rack.session&quot;] = Hash.new
         end
 
-        def commit_session(env, status, headers, body)
-          session_data = Marshal.dump(env[&quot;rack.session&quot;])
-          session_data = Base64.encode64(session_data)
+        env[&quot;rack.session.options&quot;] = @default_options.dup
+      end
 
-          if session_data.size &gt; (4096 - @key.size)
-            env[&quot;rack.errors&quot;].puts(&quot;Warning! Rack::Session::Cookie data size exceeds 4K. Content dropped.&quot;)
-            [status, headers, body]
-          else
-            options = env[&quot;rack.session.options&quot;]
-            cookie = Hash.new
-            cookie[:value] = session_data
-            cookie[:expires] = Time.now + options[:expire_after] unless options[:expire_after].nil?
-            response = Rack::Response.new(body, status, headers)
-            response.set_cookie(@key, cookie.merge(options))
-            response.to_a
-          end
-        end
+      def commit_session(env, status, headers, body)
+        session_data = Marshal.dump(env[&quot;rack.session&quot;])
+        session_data = Base64.encode64(session_data)
 
+        if session_data.size &gt; (4096 - @key.size)
+          env[&quot;rack.errors&quot;].puts(&quot;Warning! Rack::Session::Cookie data size exceeds 4K. Content dropped.&quot;)
+          [status, headers, body]
+        else
+          options = env[&quot;rack.session.options&quot;]
+          cookie = Hash.new
+          cookie[:value] = session_data
+          cookie[:expires] = Time.now + options[:expire_after] unless options[:expire_after].nil?
+          response = Rack::Response.new(body, status, headers)
+          response.set_cookie(@key, cookie.merge(options))
+          response.to_a
+        end
       end
 
-    end    
-
+    end
   end
+end</diff>
      <filename>lib/rack/session/cookie.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,7 @@ module Rack
   #
   # Be careful when you use this on public-facing sites as it could
   # reveal information helpful to attackers.
-  
+
   class ShowExceptions
     CONTEXT = 7
 </diff>
      <filename>lib/rack/showexceptions.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@ module Rack
   # Additional details can be put into &lt;tt&gt;rack.showstatus.detail&lt;/tt&gt;
   # and will be shown as HTML.  If such details exist, the error page
   # is always rendered, even if the reply was not empty.
-  
+
   class ShowStatus
     def initialize(app)
       @app = app</diff>
      <filename>lib/rack/showstatus.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,7 @@ module Rack
   #
   # URLMap dispatches in such a way that the longest paths are tried
   # first, since they are most specific.
-  
+
   class URLMap
     def initialize(map)
       @mapping = map.map { |location, app|</diff>
      <filename>lib/rack/urlmap.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ require 'tempfile'
 module Rack
   # Rack::Utils contains a grab-bag of useful methods for writing web
   # applications adopted from all kinds of Ruby libraries.
-  
+
   module Utils
     # Performs URI escaping so that you can construct proper
     # query strings faster.  Use this rather than the cgi.rb</diff>
      <filename>lib/rack/utils.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e256ec6f3ac9eba66d1a82af595a33c981596aaa</id>
    </parent>
  </parents>
  <author>
    <name>Christian Neukirchen</name>
    <email>chneukirchen@gmail.com</email>
  </author>
  <url>http://github.com/chneukirchen/rack/commit/230d62c722ee24202a29b017c59d3229bc6e1e89</url>
  <id>230d62c722ee24202a29b017c59d3229bc6e1e89</id>
  <committed-date>2007-05-16T07:53:00-07:00</committed-date>
  <authored-date>2007-05-16T07:53:00-07:00</authored-date>
  <message>Fix trailing whitespace.  Sigh.

darcs-hash:20070516145358-4fc50-4b716d93f0cc24d1e988443228312c6bcdfc1e7b.gz</message>
  <tree>5c09fc735910023aad211052ac01c3b5593a21d5</tree>
  <committer>
    <name>Christian Neukirchen</name>
    <email>chneukirchen@gmail.com</email>
  </committer>
</commit>
