Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ protected void throwTooLongBoundarySizeException(final String contentType, final

protected void setupServletFileUpload(final JakartaServletDiskFileUpload upload, final HttpServletRequest request) {
upload.setHeaderCharset(Charset.forName(request.getCharacterEncoding()));
upload.setSizeMax(getSizeMax());
upload.setFileCountMax(getFileCountMax()); // since commons-fileupload-1.5
upload.setMaxSize(getSizeMax());
upload.setMaxFileCount(getFileCountMax()); // since commons-fileupload-1.5
}

protected long getSizeMax() {
Expand Down Expand Up @@ -235,7 +235,11 @@ protected void showFieldLoggingTitle() {

protected void showFormFieldParameter(final DiskFileItem item) {
if (logger.isDebugEnabled()) {
logger.debug("[param] {}={}", item.getFieldName(), item.getString());
try {
logger.debug("[param] {}={}", item.getFieldName(), item.getString());
} catch (final IOException e) {
logger.debug("[param] {}=(failed to read)", item.getFieldName());
}
}
}

Expand Down Expand Up @@ -263,7 +267,11 @@ protected void addTextParameter(final HttpServletRequest request, final DiskFile
try {
value = item.getString(Charset.forName("ISO-8859-1"));
} catch (final java.io.UnsupportedEncodingException uee) {
value = item.getString();
try {
value = item.getString();
} catch (final IOException e) {
throw new IllegalStateException("Failed to get string from the item: " + item, e);
}
} catch (final IOException e) {
throw new IllegalStateException("Failed to get string from the item: " + item, e);
}
Expand Down
Loading