javaee / grizzly

Writing scalable server applications in the Java™ programming language has always been difficult. Before the advent of the Java New I/O API (NIO), thread management issues made it impossible for a server to scale to thousands of users. The Grizzly NIO framework has been designed to help developers to take advantage of the Java™ NIO API.
https://javaee.github.io/grizzly/
Other
222 stars 60 forks source link

Abort request exceeding maxPostSize with HTTP 413 #1929

Closed hankipanky closed 7 years ago

hankipanky commented 7 years ago

When an incoming request exceeds the configured maxPostSize, grizzly aborts the request with HTTP 400.

Would you be able to please report this as HTTP 413 Payload Too Large?

rlubke commented 7 years ago

@jashap Hey James, mind looking into this?

jashap commented 7 years ago

Sure, I'll take a look

hankipanky commented 7 years ago

Hi @rlubke, @jashap,

thanks for this. May I suggest to use HttpStatus.REQUEST_ENTITY_TOO_LARGE_413.getReasonPhrase() along with the status code 413?

Thanks, Henning

rlubke commented 7 years ago

Ugh, sorry about that. Fixed.