regurgitator RubyGem user+dev discussion/patches/pulls/bug/help
 help / color / mirror / code / Atom feed
* [PATCH] local_file: avoid deprecated Rack::Utils.byte_ranges
@ 2016-11-02  0:36 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2016-11-02  0:36 UTC (permalink / raw)
  To: regurgitator-public; +Cc: Eric Wong

Rack::Utils.get_byte_ranges is the replacement
for rack 2.x.
---
 lib/regurgitator/local_file.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/regurgitator/local_file.rb b/lib/regurgitator/local_file.rb
index 2a6566f..39c540a 100644
--- a/lib/regurgitator/local_file.rb
+++ b/lib/regurgitator/local_file.rb
@@ -28,7 +28,7 @@ class Regurgitator::LocalFile # :nodoc:
     }
     @response = [ 200, headers ]
 
-    ranges = Rack::Utils.byte_ranges(env, size)
+    ranges = Rack::Utils.get_byte_ranges(env['HTTP_RANGE'], size)
     if nil == ranges || ranges.size > 1
       @range = nil
     elsif @range = ranges[0]
-- 
EW


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-11-02  0:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-02  0:36 [PATCH] local_file: avoid deprecated Rack::Utils.byte_ranges Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/regurgitator.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).