def handle(ctx, params)
response = params[:response]
response_body = params[:response_body]
uri = params[:uri]
content_type = nil
unless response['Content-Type'].nil?
data = response['Content-Type'].match(/^([^;]*)/)
content_type = data[1].downcase unless data.nil?
end
params[:page] = @pluggable_parser.parser(content_type).new(
uri,
response,
response_body,
response.code
) { |parser|
parser.mech = params[:agent] if parser.respond_to? :mech=
if parser.respond_to?(:watch_for_set=) && @watch_for_set
parser.watch_for_set = @watch_for_set
end
}
super
end