Loading src/tap/ADQLExecutor.java +4 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import tap.parameters.DALIUpload; import tap.parameters.TAPParameters; import tap.upload.Uploader; import uws.UWSException; import uws.UWSToolBox; import uws.job.JobThread; import uws.job.Result; import uws.service.log.UWSLog.LogLevel; Loading Loading @@ -610,6 +611,9 @@ public class ADQLExecutor { // Set the HTTP content type to the MIME type of the result format: response.setContentType(formatter.getMimeType()); // Set the character encoding: response.setCharacterEncoding(UWSToolBox.DEFAULT_CHAR_ENCODING); // Write the formatted result in the HTTP response output: start = System.currentTimeMillis(); writeResult(queryResult, formatter, response.getOutputStream()); Loading src/tap/error/DefaultTAPErrorWriter.java +4 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import tap.formatter.VOTableFormat; import tap.log.DefaultTAPLog; import tap.log.TAPLog; import uws.UWSException; import uws.UWSToolBox; import uws.job.ErrorSummary; import uws.job.ErrorType; import uws.job.UWSJob; Loading Loading @@ -193,6 +194,9 @@ public class DefaultTAPErrorWriter implements ServiceErrorWriter { // Set the MIME type of the answer (XML for a VOTable document): response.setContentType("application/xml"); // Set the character encoding: response.setCharacterEncoding(UWSToolBox.DEFAULT_CHAR_ENCODING); }catch(IllegalStateException ise){ /* If it is not possible any more to reset the response header and body, * the error is anyway written in order to corrupt the HTTP response. Loading src/tap/metadata/TAPMetadata.java +1 −0 Original line number Diff line number Diff line Loading @@ -456,6 +456,7 @@ public class TAPMetadata implements Iterable<TAPSchema>, VOSIResource, TAPResour @Override public boolean executeResource(HttpServletRequest request, HttpServletResponse response) throws IOException{ response.setContentType("application/xml"); response.setCharacterEncoding(UWSToolBox.DEFAULT_CHAR_ENCODING); PrintWriter writer = response.getWriter(); write(writer); Loading src/tap/resource/Availability.java +6 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ package tap.resource; * You should have received a copy of the GNU Lesser General Public License * along with TAPLibrary. If not, see <http://www.gnu.org/licenses/>. * * Copyright 2012,2014 - UDS/Centre de Données astronomiques de Strasbourg (CDS), * Copyright 2012-2015 - UDS/Centre de Données astronomiques de Strasbourg (CDS), * Astronomisches Rechen Institut (ARI) */ Loading @@ -31,12 +31,13 @@ import javax.servlet.http.HttpServletResponse; import tap.ServiceConnection; import tap.TAPException; import uk.ac.starlink.votable.VOSerializer; import uws.UWSToolBox; /** * <p>TAP resource describing the availability of a TAP service.</p> * * @author Grégory Mantelet (CDS;ARI) * @version 2.0 (09/2014) * @version 2.0 (04/2015) */ public class Availability implements TAPResource, VOSIResource { Loading Loading @@ -109,6 +110,9 @@ public class Availability implements TAPResource, VOSIResource { // Set the response MIME type (XML): response.setContentType("text/xml"); // Set the character encoding: response.setCharacterEncoding(UWSToolBox.DEFAULT_CHAR_ENCODING); // Get the output stream: PrintWriter pw = response.getWriter(); Loading src/tap/resource/Capabilities.java +5 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import javax.servlet.http.HttpServletResponse; import tap.TAPException; import uk.ac.starlink.votable.VOSerializer; import uws.UWSToolBox; /** * <p>TAP resource describing the capabilities of a TAP service.</p> Loading @@ -38,7 +39,7 @@ import uk.ac.starlink.votable.VOSerializer; * <p>This resource just return an XML document giving a description of the TAP service and list all its VOSI resources.</p> * * @author Grégory Mantelet (CDS;ARI) * @version 2.0 (02/2015) * @version 2.0 (04/2015) */ public class Capabilities implements TAPResource, VOSIResource { Loading Loading @@ -112,6 +113,9 @@ public class Capabilities implements TAPResource, VOSIResource { // Set the response MIME type (XML): response.setContentType("application/xml"); // Set the character encoding: response.setCharacterEncoding(UWSToolBox.DEFAULT_CHAR_ENCODING); // Get the response stream: PrintWriter out = response.getWriter(); Loading Loading
src/tap/ADQLExecutor.java +4 −0 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import tap.parameters.DALIUpload; import tap.parameters.TAPParameters; import tap.upload.Uploader; import uws.UWSException; import uws.UWSToolBox; import uws.job.JobThread; import uws.job.Result; import uws.service.log.UWSLog.LogLevel; Loading Loading @@ -610,6 +611,9 @@ public class ADQLExecutor { // Set the HTTP content type to the MIME type of the result format: response.setContentType(formatter.getMimeType()); // Set the character encoding: response.setCharacterEncoding(UWSToolBox.DEFAULT_CHAR_ENCODING); // Write the formatted result in the HTTP response output: start = System.currentTimeMillis(); writeResult(queryResult, formatter, response.getOutputStream()); Loading
src/tap/error/DefaultTAPErrorWriter.java +4 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ import tap.formatter.VOTableFormat; import tap.log.DefaultTAPLog; import tap.log.TAPLog; import uws.UWSException; import uws.UWSToolBox; import uws.job.ErrorSummary; import uws.job.ErrorType; import uws.job.UWSJob; Loading Loading @@ -193,6 +194,9 @@ public class DefaultTAPErrorWriter implements ServiceErrorWriter { // Set the MIME type of the answer (XML for a VOTable document): response.setContentType("application/xml"); // Set the character encoding: response.setCharacterEncoding(UWSToolBox.DEFAULT_CHAR_ENCODING); }catch(IllegalStateException ise){ /* If it is not possible any more to reset the response header and body, * the error is anyway written in order to corrupt the HTTP response. Loading
src/tap/metadata/TAPMetadata.java +1 −0 Original line number Diff line number Diff line Loading @@ -456,6 +456,7 @@ public class TAPMetadata implements Iterable<TAPSchema>, VOSIResource, TAPResour @Override public boolean executeResource(HttpServletRequest request, HttpServletResponse response) throws IOException{ response.setContentType("application/xml"); response.setCharacterEncoding(UWSToolBox.DEFAULT_CHAR_ENCODING); PrintWriter writer = response.getWriter(); write(writer); Loading
src/tap/resource/Availability.java +6 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ package tap.resource; * You should have received a copy of the GNU Lesser General Public License * along with TAPLibrary. If not, see <http://www.gnu.org/licenses/>. * * Copyright 2012,2014 - UDS/Centre de Données astronomiques de Strasbourg (CDS), * Copyright 2012-2015 - UDS/Centre de Données astronomiques de Strasbourg (CDS), * Astronomisches Rechen Institut (ARI) */ Loading @@ -31,12 +31,13 @@ import javax.servlet.http.HttpServletResponse; import tap.ServiceConnection; import tap.TAPException; import uk.ac.starlink.votable.VOSerializer; import uws.UWSToolBox; /** * <p>TAP resource describing the availability of a TAP service.</p> * * @author Grégory Mantelet (CDS;ARI) * @version 2.0 (09/2014) * @version 2.0 (04/2015) */ public class Availability implements TAPResource, VOSIResource { Loading Loading @@ -109,6 +110,9 @@ public class Availability implements TAPResource, VOSIResource { // Set the response MIME type (XML): response.setContentType("text/xml"); // Set the character encoding: response.setCharacterEncoding(UWSToolBox.DEFAULT_CHAR_ENCODING); // Get the output stream: PrintWriter pw = response.getWriter(); Loading
src/tap/resource/Capabilities.java +5 −1 Original line number Diff line number Diff line Loading @@ -31,6 +31,7 @@ import javax.servlet.http.HttpServletResponse; import tap.TAPException; import uk.ac.starlink.votable.VOSerializer; import uws.UWSToolBox; /** * <p>TAP resource describing the capabilities of a TAP service.</p> Loading @@ -38,7 +39,7 @@ import uk.ac.starlink.votable.VOSerializer; * <p>This resource just return an XML document giving a description of the TAP service and list all its VOSI resources.</p> * * @author Grégory Mantelet (CDS;ARI) * @version 2.0 (02/2015) * @version 2.0 (04/2015) */ public class Capabilities implements TAPResource, VOSIResource { Loading Loading @@ -112,6 +113,9 @@ public class Capabilities implements TAPResource, VOSIResource { // Set the response MIME type (XML): response.setContentType("application/xml"); // Set the character encoding: response.setCharacterEncoding(UWSToolBox.DEFAULT_CHAR_ENCODING); // Get the response stream: PrintWriter out = response.getWriter(); Loading