repo.or.cz
/
rainbows.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
writer_thread_*: split out classes into separate files
[rainbows.git]
/
lib
/
rainbows
/
max_body
/
rewindable_wrapper.rb
blob
5693eadc397f6249c9b82abdbc2cc522ed11d979
1
# -*- encoding: binary -*-
2
# :enddoc:
3
class Rainbows::MaxBody::RewindableWrapper < Rainbows::MaxBody::Wrapper
4
def initialize(rack_input, limit)
5
@orig_limit = limit
6
super
7
end
8
9
def rewind
10
@limit = @orig_limit
11
@rbuf = ''
12
@input.rewind
13
end
14
15
def size
16
@input.size
17
end
18
end