t.getResponseHeaders().add("Content-type", mimeType);
t.getResponseHeaders().add("Transfer-encoding", "chunked");
t.sendResponseHeaders(200, 0);
OutputStream os = t.getResponseBody();
if(Endpoint.log){
os = new OutputStreamLogger(os);
}
os = new PipeOutputStream(os, writer);
formatter.writeResult(os, this.evaluator.getVariablesOfQuery(), queryResult);
os.close();
writer.close();