Fix multipart data with empty lines

This commit is contained in:
jeffcheasey88 2023-09-18 12:47:28 +02:00
parent b58934cff8
commit f176f118a3

View file

@ -121,9 +121,10 @@ Content-Type: text/javascript
while (((line = readLine()) != null) && (line.length() > 0));
String buffer = "";
while (((line = readLine()) != null) && (!line.startsWith("--"+boundary))){
buffer += line;
buffer += line+"\n";
}
list.add(buffer);
if(buffer.length() < 1) buffer = "\n";
list.add(buffer.substring(0, buffer.length()-1));
}
return list;