reports/xml/buffer.rb in arachni-0.4.4 vs reports/xml/buffer.rb in arachni-0.4.5
- old
+ new
@@ -57,16 +57,20 @@
end
def add_headers( type, headers )
start_tag type
headers.each_pair do |name, value|
- if value.is_a?( Array ) #&& name.downcase == 'set-cookie'
- append "<field name=\"#{name}\" value=\"#{escape( value.join( "\n" ) )}\" />"
- else
- append "<field name=\"#{name}\" value=\"#{escape( value )}\" />"
- end
+ add_header( name, value )
end
end_tag type
+ end
+
+ def add_header( name, value )
+ if value.is_a?( Array ) #&& name.downcase == 'set-cookie'
+ append "<field name=\"#{name}\" value=\"#{escape( value.join( "\n" ) )}\" />"
+ else
+ append "<field name=\"#{name}\" value=\"#{escape( value )}\" />"
+ end
end
def add_tags( tags )
start_tag 'tags'
tags.each { |name| append "<tag name=\"#{name}\" />" }