From 1c3bbbd1870f0f63d30108f267a9a6219470300f Mon Sep 17 00:00:00 2001 From: gmantele <gmantele@ari.uni-heidelberg.de> Date: Tue, 23 Sep 2014 17:37:03 +0200 Subject: [PATCH] [TAP] Fix MAXREC bug (maxrec was ignored if = 0) & Replace the MIME type for VOTable output from 'text/xml' to 'application/xml' --- src/tap/formatter/VOTableFormat.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tap/formatter/VOTableFormat.java b/src/tap/formatter/VOTableFormat.java index ab2e76b..b6b59c4 100644 --- a/src/tap/formatter/VOTableFormat.java +++ b/src/tap/formatter/VOTableFormat.java @@ -160,7 +160,7 @@ public class VOTableFormat implements OutputFormat { @Override public final String getMimeType(){ - return "text/xml"; + return "application/xml"; } @Override @@ -599,7 +599,7 @@ public class VOTableFormat implements OutputFormat { public boolean next() throws IOException{ irow++; try{ - if (maxrec <= 0 || irow < maxrec){ + if (maxrec < 0 || irow < maxrec){ boolean hasNext = tableIt.nextRow(); if (hasNext){ for(int i = 0; i < nbCol && tableIt.hasNextCol(); i++) -- GitLab