Displaying differences for changeset |
@@ -411,14 +411,16 @@ |
try { |
if (Config.getSessionStore().hasSession(suid)) { |
Response out = getOutputFile(uriInfo, suid, file); |
+ |
if (out.getEntity() instanceof StreamingOutput) { |
+ // inbound, local response |
StreamingOutput o = (StreamingOutput) out.getEntity(); |
return toString(o); |
} else { |
+ // outbound, client response |
InputStream is = out.readEntity(InputStream.class); |
return IOUtils.toString(is); |
} |
-// return JSONUtils.error("not found: " + suid).toString(); |
} |
return JSONUtils.error("suid unknown: " + suid).toString(); |
} catch (Exception E) { |