# File lib_core/rucy/request.rb, line 224 def set_reader(input) case (@method) when 'POST', 'PUT' if (has_header? 'Content-Length') then @content_length = header('Content-Length').to_i if (@content_length < 0) then raise HTTPError.new(403, 'Negative Content-Length') end elsif (conn_closed?) then @content_length = nil else raise HTTPError.new(411) # Length Required end @messg_reader = input @ready_to_read = true @line_buf = '' else # nothing to do. end nil end