1 # Stop rails from automatically parsing XML in request bodies
2 Rails.configuration.middleware.delete ActionDispatch::ParamsParser
4 # https://github.com/rails/rails/issues/20710
7 def html_document_with_rss
8 @html_document ||= if @response.content_type == Mime::RSS
9 Nokogiri::XML::Document.parse(@response.body)
11 html_document_without_rss
15 alias_method_chain :html_document, :rss