Process multi-line "contents" variable when printing a file
This commit is contained in:
parent
4f0b3208a8
commit
7ef283df90
|
|
@ -312,6 +312,14 @@ public final class ApiConnectionImpl extends ApiConnection {
|
||||||
if (parts.length == 3) {
|
if (parts.length == 3) {
|
||||||
if (!parts[2].endsWith("\r")) {
|
if (!parts[2].endsWith("\r")) {
|
||||||
res.put(parts[1], unpackResult(parts[2]));
|
res.put(parts[1], unpackResult(parts[2]));
|
||||||
|
} else {
|
||||||
|
final StringBuilder sb = new StringBuilder();
|
||||||
|
sb.append(parts[2]);
|
||||||
|
while (!lines.isEmpty()) {
|
||||||
|
nextLine();
|
||||||
|
sb.append(line);
|
||||||
|
}
|
||||||
|
res.put(parts[1], sb.toString());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new ApiDataException(String.format("Malformed line '%s'", line));
|
throw new ApiDataException(String.format("Malformed line '%s'", line));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue