Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Buffering capacity exceeded... AuthenticationProtocolHandler.DEFAULT_MAX_CONTENT_LENGTH too small?

Mark,

thanks for doing some analysis on this.  It does look strange that we have such a small content limit on authentication response bodies.

Can you raise a bugzilla and that will ensure this get's proper attention, hopefully before the next release.

cheers


On 21 September 2015 at 06:23, Mark Mielke <mark.mielke@xxxxxxxxx> wrote:
I previously sent this to jetty-users and saw no response. Possibly I should have sent to jetty-dev directly:

I am using Jetty HttpClient to access a remote JIRA install, and a remote Crucible install. Some requests are failing with "Buffering capacity exceeded ..."

I do not believe this is due to BufferingResponseListener's default maxLength of 2 MBytes. These requests are fairly small and simple. I believe it is the authentication requests which are failing, which are using WWWAuthenticationProtocolHandler, which calls AuthenticationProtocolHandler with a maxContentLength of AuthenticationProtocolHandler.DEFAULT_MAX_CONTENT_LENGTH which is only 4096.

I believe JIRA is sometimes returning HTTP 401 with an HTML body which is exceeding 4096 bytes. It may also have a number of long headers.

Is there a reason why AuthenticationProtocolHandler.DEFAULT_MAX_CONTENT_LENGTH is so small? Why shouldn't it use the same default as a BufferingResponseListener of 2 MBytes? Since it will accept up to 2 MBytes for a regular response, why wouldn't it accept up to 2 MBytes for an HTTP 401 response?

Thanks!

P.S. I think ideally, WWWAuthenticationProtocolHandler and most others should only need to buffer the headers, and buffering the content is unnecessary. But, I guess it is tricky to implement this and it hasn't been a priority?


--
Mark Mielke <mark.mielke@xxxxxxxxx>




--
Mark Mielke <mark.mielke@xxxxxxxxx>


_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-dev



--

Back to the top