patch for LSWS handler

0 views
Skip to first unread message

george

unread,
Oct 23, 2009, 1:00:47 AM10/23/09
to Rack Development
Hi,

The LSWS handler is broken in Rack 1.0.1, the following patch should
fix it.

Thanks,
George Wang



*** lsws.rb Fri Oct 23 00:49:41 2009
--- lsws.rb.new Fri Oct 23 00:52:10 2009
***************
*** 1,5 ****
--- 1,6 ----
require 'lsapi'
require 'rack/content_length'
+ require 'rack/rewindable_input'

module Rack
module Handler
***************
*** 38,43 ****
--- 39,46 ----
ensure
body.close if body.respond_to? :close
end
+ ensure
+ rack_input.close
end
def self.send_headers(status, headers)
print "Status: #{status}\r\n"

Michael Fellinger

unread,
Oct 23, 2009, 4:51:16 AM10/23/09
to rack-...@googlegroups.com
On Fri, Oct 23, 2009 at 2:00 PM, george <gwan...@gmail.com> wrote:
>
> Hi,
>
> The LSWS handler is broken in Rack 1.0.1, the following patch should
> fix it.

Applied with:
http://github.com/rack/rack/commit/cd401dfd01dbd8276ae817af2089c8c4d9fda6c4

>
> Thanks,
> George Wang
>
>
>
> *** lsws.rb     Fri Oct 23 00:49:41 2009
> --- lsws.rb.new Fri Oct 23 00:52:10 2009
> ***************
> *** 1,5 ****
> --- 1,6 ----
>  require 'lsapi'
>  require 'rack/content_length'
> + require 'rack/rewindable_input'
>
>  module Rack
>    module Handler
> ***************
> *** 38,43 ****
> --- 39,46 ----
>          ensure
>            body.close if body.respond_to? :close
>          end
> +       ensure
> +         rack_input.close
>        end
>        def self.send_headers(status, headers)
>          print "Status: #{status}\r\n"
>

--
Michael Fellinger
CTO, The Rubyists, LLC
972-996-5199

Reply all
Reply to author
Forward
0 new messages