lib/rack-xslview.rb in rack-xslview-0.2.1 vs lib/rack-xslview.rb in rack-xslview-0.2.2
- old
+ new
@@ -20,11 +20,12 @@
def call(env)
# No matter what, @app will be called
status, headers, body = original_response = @app.call(env)
-
- return original_response if (status == 304 || status == 204)
+
+ exluded_status = Array[204, 301, 302, 304]
+ return original_response if exluded_status.include?(status)
return original_response unless headers["Content-Type"].to_s.match(/(ht|x)ml/)
# If setup includes paths to exclude from xslt processing, check them
checknoxsl(env) if @options[:noxsl]