Marek - can you complete this thread please. I think this exception
class will be useful but I won't dispute if you stick to your original
decision
Sergey
On 05/12/12 15:24, Sergey Beryozkin wrote:
> On 05/12/12 15:13, Bill Burke wrote:
>>
>>
>> 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?
>>
> Personally I do not see any particular harm; but - I can think of
> why/when any of the already added exception classes can be used. If no
> other status covered specifically covered yet then I guess we haven't
> had any particular demand for such specific exceptions yet
>
>>> 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.
>
> Yes - but I'm referring to the runtime effectively enforcing the denial
> of service attacks or preventing the overload where the user has
> explicitly requested so, limit the payload to a specific max size only...
>
>
>> But, IMO, we should have an exception for every error
>> code anyways (and even some redirects).
>>
>>
>
> Cheers, Sergey