mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
修复graalvm编译后,未读取Content-Length可能导致的读取时间过长问题
This commit is contained in:
@@ -81,7 +81,7 @@ public class MultipartFormData {
|
||||
if (header.isFile == true) {
|
||||
// 文件类型的表单项
|
||||
final String fileName = header.fileName;
|
||||
if (fileName.length() > 0 && header.contentType.contains("application/x-macbinary")) {
|
||||
if (!fileName.isEmpty() && header.contentType.contains("application/x-macbinary")) {
|
||||
input.skipBytes(128);
|
||||
}
|
||||
final UploadFile newFile = new UploadFile(header, setting);
|
||||
|
@@ -29,6 +29,11 @@ import java.nio.charset.Charset;
|
||||
*/
|
||||
public class MultipartRequestInputStream extends BufferedInputStream {
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
* @param in {@link InputStream}
|
||||
*/
|
||||
public MultipartRequestInputStream(final InputStream in) {
|
||||
super(in);
|
||||
}
|
||||
@@ -101,6 +106,11 @@ public class MultipartRequestInputStream extends BufferedInputStream {
|
||||
|
||||
protected UploadFileHeader lastHeader;
|
||||
|
||||
/**
|
||||
* 获取最后的头信息
|
||||
*
|
||||
* @return 头信息
|
||||
*/
|
||||
public UploadFileHeader getLastHeader() {
|
||||
return lastHeader;
|
||||
}
|
||||
|
Reference in New Issue
Block a user