[
https://issues.apache.org/jira/browse/HTTPCORE-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495669
]
Steffen Pingel commented on HTTPCORE-72:
----------------------------------------
I agree that it should be a small value such as 512 that fits a typical HTTP
request and keeps the per connection overhead low by default. As an alternative
the constructor of NHttpConnectionBase could the value of buffersize and throw
a meaningful exception.
> HttpConnectionParams.getSocketBufferSize() returns -1 by default
> ----------------------------------------------------------------
>
> Key: HTTPCORE-72
> URL: https://issues.apache.org/jira/browse/HTTPCORE-72
> Project: HttpComponents Core
> Issue Type: Improvement
> Components: HttpCore NIO
> Affects Versions: 4.0-alpha5
> Reporter: Steffen Pingel
>
> I was using an object of type BasicHttpParams which had no properties set and
> got an exception in the constructor of ExpandableBuffer when I tried to
> create a DefaultNHttpServerConnection. It is somewhat difficult for a caller
> to tell from the trace was the cause of the error actually is:
> java.lang.IllegalArgumentException
> at java.nio.Buffer.<init>(Buffer.java:174)
> at java.nio.ByteBuffer.<init>(ByteBuffer.java:259)
> at java.nio.ByteBuffer.<init>(ByteBuffer.java:267)
> at java.nio.MappedByteBuffer.<init>(MappedByteBuffer.java:64)
> at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:94)
> at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
> at
> org.apache.http.nio.util.ExpandableBuffer.<init>(ExpandableBuffer.java:46)
> at
> org.apache.http.impl.nio.reactor.SessionInputBuffer.<init>(SessionInputBuffer.java:55)
> at
> org.apache.http.impl.nio.NHttpConnectionBase.<init>(NHttpConnectionBase.java:111)
> at
> org.apache.http.impl.nio.DefaultNHttpServerConnection.<init>(DefaultNHttpServerConnection.java:63)
> [...]
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]