lib/middleman-sprockets/environment.rb in middleman-sprockets-3.4.1 vs lib/middleman-sprockets/environment.rb in middleman-sprockets-3.4.2

- old
+ new

@@ -183,10 +183,12 @@ false end def call(env) # Set the app current path based on the full URL so that helpers work - request_path = URI.decode(File.join(env['SCRIPT_NAME'], env['PATH_INFO'])) + script_name = env['SCRIPT_NAME'].dup + script_name.gsub!(/^#{@app.config[:http_prefix]}/i, '') if @app.config[:http_prefix] + request_path = URI.decode(File.join(script_name, env['PATH_INFO'])) if request_path.respond_to? :force_encoding request_path.force_encoding('UTF-8') end resource = @app.sitemap.find_resource_by_destination_path(request_path)