Comments (3)
The relevant bit of the JVM exception trace from JRuby is shown below:
java.nio.BufferOverflowException
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:189)
at org.jruby.util.IOChannel.read(IOChannel.java:93)
at org.jruby.util.IOChannel$IOReadableByteChannel.read(IOChannel.java:151)
at org.jruby.RubyIO.transfer(RubyIO.java:4454)
at org.jruby.RubyIO.copy_stream(RubyIO.java:4345)
at org.jruby.RubyIO$INVOKER$s$0$2$copy_stream.call(RubyIO$INVOKER$s$0$2$copy_stream.gen)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodN.call(JavaMethod.java:819)
at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:211)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:203)
at Users.headius.projects.jruby.lib.ruby.stdlib.net.http.generic_request.invokeOther21:copy_stream(/Users/headius/projects/jruby/lib/ruby/stdlib/net/http/generic_request.rb:212)
...
Because readpartial
returned more data than requested, we are forced to raise an error from our IOReadableByteChannel (which wraps an IO-like object with a JVM IO Channel) since there's simply nowhere in the buffer to put it.
from webrick.
FWIW the new error that JRuby will raise in this case:
(IOError) error calling WEBrick::HTTPRequest#readpartial: requested 8192 but received 65536
This error ends up getting swallowed by net/http plumbing, but the result is the same.
from webrick.
The change in #45 does appear to fix this issue.
from webrick.
Related Issues (20)
- Is there any way to perform a connection upgrade (e.g. WebSockets) without monkey-patching `HTTPServer`? HOT 1
- WEBrick has an unsafe shutdown process it tries to concurrently write and close the @shutdown_pipe HOT 4
- Webrick `1.8.0` is incompatible with Rack `2.2.6.2` HOT 1
- Unicode handling in header location HOT 11
- test_httpresponse.rb test failures HOT 2
- MAX_URI_LENGTH exceeded results in nonsensical error HOT 2
- License on rubygems.org HOT 2
- POST/PUT with an empty body hangs forever HOT 3
- Allow PUT requests by default HOT 1
- Handle OpenSSL::SSL:SSLError HOT 4
- Support Relative URIs in Location Header HOT 2
- parsing multipart/form-data HOT 1
- HTTPProxyServer should not send Content-Length header in successful responses to CONNECT requests
- How does this relate to WEBrick that ships with Ruby? (asking for CVE-2009-4492) HOT 6
- `OpenSSL::SSL::SSLError: SSL_read: unexpected eof while reading` with OpenSSL 3.x HOT 3
- webrick missing as requirement? HOT 2
- `WEBrick::HTTPUtils.escape(nil)` raises a confusing exception
- WEBrick::HTTPProxyServer hangs when process exits HOT 1
- Ruby version is showing up in Webrick Headers, and we need to edit that for security reason HOT 4
- WEBRick::HTTPServer creates ipv6only socket for host `::` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webrick.