Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix bug for paths with spaces

  • Loading branch information...
commit 0b2f88826bb3adb77dd00fdb79d2e166a63d7dfc 1 parent 32ec959
@DohMoose DohMoose authored committed
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/rack/offline.rb
View
7 lib/rack/offline.rb
@@ -3,6 +3,7 @@
require "digest/sha2"
require "logger"
require "pathname"
+require 'uri'
module Rack
class Offline
@@ -37,20 +38,20 @@ def call(env)
body = ["CACHE MANIFEST"]
body << "# #{key}"
@config.cache.each do |item|
- body << item
+ body << URI.escape(item.to_s)
end
unless @config.network.empty?
body << "" << "NETWORK:"
@config.network.each do |item|
- body << item
+ body << URI.escape(item.to_s)
end
end
unless @config.fallback.empty?
body << "" << "FALLBACK:"
@config.fallback.each do |namespace, url|
- body << "#{namespace} #{url}"
+ body << "#{namespace} #{URI.escape(url.to_s)}"
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.