On 12/4/2012 12:00 PM, Sergey Beryozkin wrote:
> I thought I would not worry about the related enhancement request being
> rejected, but I'm changing my mind :-) - I'm still easy on it, but
> sending this message to the list in case someone may also find an idea
> of introducing an exception class representing HTTP 413 useful.
>
> While I agree with Marek that we have to be careful about not
> introducing an exception class for every possible HTTP status starting
> from 300, I think MessageTooLargeException is the last missing exception
> class which can actually be practically used.
>
I actually disagree with the notion we can't have an exception class for
every HTTP status code where it makes sense for. What is the harm?
> Specifically, CXF reports 413 when the multipart body is too large, as
> well in some other cases. I can imagine users of jersey and Resteasy
> also finding it useful...
>
We use mime4j for multipart and I believe it will save large bodies to a
temporary file. But, IMO, we should have an exception for every error
code anyways (and even some redirects).
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com