On Tue, 28 Oct 2003, Greg Wilkins wrote:
> The encapsulation of the ByteArrayOutStream class has been
> broken because of efficiency. Because HttpRequest knows that
> it only wants to parse the buffer and then copy out the
> parts it wants to keep, there is no need to make a private
> copy of the buffer.
That's what I thought. I was thinking about a patch like you describe,
passing length to the decoder, but I'm unconvinced that form parameter
processing is so critical to performance that the straightforward fix
> The buf that is being exposes is part of the standard
> API for the class, so it should be portable.
True. Except that the javadocs say nothing about the length of "buf".
> I'll work on a patch for this shortly.
> Note that it the grand scheme of things, I do agree with you that
> the approach is wrong. Ideally I would like to parse the form
> content as it arrives and not have to have it completely in a buffer
> at all (thus I could have a fixed size buffer that is reused).
> I'll be looking at doing this in JettyExperimental.
Sounds good. I ought to take a look at JettyExperimental sometime, as it
sounds like a good fit for what we do.