-
-
Notifications
You must be signed in to change notification settings - Fork 901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nokogiri::XML::SAX::PushParser incompatibility with JRuby in Nokogiri 1.5.0 #615
Comments
Thanks for reporting. It seems sax push parser has many bugs. Not only this. I'll fix it. |
To add a bit more context, this is still an issue on JRuby 1.6.7 with Nokogiri 1.5.3rc2. It appears the parser isn't creating as many Blocks as there are Segments. I'll try to take a crack at it, but I'm having difficulty building the gem at the moment (working that out on the user list). |
Oh, and I'm trying to work up a test case, but I'm seeing this with fog, which makes pretty heavy use of the SAX parser. I just can't expose my AWS keys for the example. |
I pushed the change yesterday. I rewrote push parser widely, and stopped using PushInputStream. Now, I don't get the exception anymore. However, the gist never returns. This is because pure Java version uses a thread to keep waiting upcoming inputs. The thread stops by calling finish method or getting an exception. So, the gist, https://gist.github.com/2360551 , terminates running the thread and exits. I'm thinking to add some time out feature, but not now. Does this behavior work for you? |
I'm going to close this issue since new push parser doesn't raise exception for a given example. If still there's a issue, please reopen that. |
There is a bug in Nokogiri 1.5.0 with the Nokogiri::XML::SAX::PushParser that causes this exception under JRuby v1.6.6, 1.6.5, and 1.6.4. It does not break under vanilla ruby, nor under JRuby with Nokogiri 1.4.7. Here is a sample script that reproduces the problem: https://gist.github.com/1819696
One example of user impact is that this breaks the implementation of AWS S3 access in the latest version of Fog (v1.1.2).
The text was updated successfully, but these errors were encountered: