Rename LENGTH_REQUEST_ENTITY_TOO_LARGE -> REQUEST_ENTITY_TOO_LARGE
Actually use LENGTHLIMIT constant
Catch REQUEST_ENTITY_TOO_LARGE error
Move length check out of try-catch
Change content-length from int to long to avoid NumberFormatExceptions