Project

General

Profile

Bug #9369

Using XMLScanStreamParser in xmlrpc/parser may result in parse errors

Added by herwinw (Herwin Quarantainenet) over 4 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:59588]

Description

I've tried to use the attached script to test if the XMLScanStreamParser would be a suitable alternative for REXMLParser (which often results in out-of-memory-errors when using large data chunks). Unfortunately, using this parser results in other errors:

/usr/lib/ruby/1.9.1/xmlrpc/parser.rb:747:in `on_stag_end': wrong number of arguments (3 for 1) (ArgumentError)

The code calling on_stag_end in xmlscan/parser.rb is quite simple:

def on_stag_end(name, *a)
@visitor.on_stag_end name, *a
end

The following should probably fix this (although I've got no idea if this has any side effects):

  • def on_stag_end(name); end
  • def on_stag_end(name, *a); end

An alternative solution might be to remove the definition of on_stag_end completely, that will result in a call to method_missing, which doesn't do anything either.

parser.rb (297 Bytes) parser.rb test file for behaviour of parser herwinw (Herwin Quarantainenet), 01/06/2014 07:30 PM

Related issues

Related to Ruby trunk - Bug #9370: Parse error when using XMLTreeParser in xmlrpcClosed

Associated revisions

Revision a2845a44
Added by hsbt (Hiroshi SHIBATA) over 2 years ago

  • lib/xmlrpc.rb: Removed broken parser named XMLScanStreamParser. It's not works with current Ruby version. [fix GH-1271][Bug #9369]
  • lib/xmlrpc/config.rb: ditto.
  • lib/xmlrpc/parser.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 53981
Added by hsbt (Hiroshi SHIBATA) over 2 years ago

  • lib/xmlrpc.rb: Removed broken parser named XMLScanStreamParser. It's not works with current Ruby version. [fix GH-1271][Bug #9369]
  • lib/xmlrpc/config.rb: ditto.
  • lib/xmlrpc/parser.rb: ditto.

Revision 53981
Added by hsbt (Hiroshi SHIBATA) over 2 years ago

  • lib/xmlrpc.rb: Removed broken parser named XMLScanStreamParser. It's not works with current Ruby version. [fix GH-1271][Bug #9369]
  • lib/xmlrpc/config.rb: ditto.
  • lib/xmlrpc/parser.rb: ditto.

Revision 53981
Added by hsbt (Hiroshi SHIBATA) over 2 years ago

  • lib/xmlrpc.rb: Removed broken parser named XMLScanStreamParser. It's not works with current Ruby version. [fix GH-1271][Bug #9369]
  • lib/xmlrpc/config.rb: ditto.
  • lib/xmlrpc/parser.rb: ditto.

History

#1 Updated by hsbt (Hiroshi SHIBATA) over 2 years ago

  • Status changed from Open to Closed

Applied in changeset r53981.


  • lib/xmlrpc.rb: Removed broken parser named XMLScanStreamParser. It's not works with current Ruby version. [fix GH-1271][Bug #9369]
  • lib/xmlrpc/config.rb: ditto.
  • lib/xmlrpc/parser.rb: ditto.

#2 Updated by usa (Usaku NAKAMURA) over 2 years ago

  • Related to Bug #9370: Parse error when using XMLTreeParser in xmlrpc added

Also available in: Atom PDF