Skip to content

Commit

Permalink
CADC-13577 cleanup GetAction
Browse files Browse the repository at this point in the history
  • Loading branch information
jburke-cadc committed Dec 12, 2024
1 parent fbcb443 commit a130745
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,11 @@ public void doAction() throws Exception {
// output the TableDesc as a VOTable
String accept = syncInput.getHeader("Accept");
if (VOTableWriter.CONTENT_TYPE.equals(accept)) {
VOTableDocument doc = TapSchemaUtil.createVOTable(td);
VOTableWriter tw = new VOTableWriter(VOTableWriter.CONTENT_TYPE);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
tw.write(doc, bos);
VOTableDocument vot = TapSchemaUtil.createVOTable(td);
VOTableWriter tw = new VOTableWriter();
syncOutput.setCode(HttpServletResponse.SC_OK);
syncOutput.setHeader("Content-Type", VOTableWriter.CONTENT_TYPE);
tw.write(doc, new OutputStreamWriter(syncOutput.getOutputStream()));
tw.write(vot, new OutputStreamWriter(syncOutput.getOutputStream()));
} else {
TableWriter tw = new TableWriter();
syncOutput.setCode(HttpServletResponse.SC_OK);
Expand Down

0 comments on commit a130745

Please sign in to comment.