Skip to content
Snippets Groups Projects
Commit 2cf01a36 authored by Robert Butora's avatar Robert Butora
Browse files

disables download of complete fitsfile/hdu when no filtering params given (only ID)

parent e988d0e6
No related branches found
No related tags found
No related merge requests found
...@@ -263,6 +263,13 @@ public class ServletCutout extends HttpServlet ...@@ -263,6 +263,13 @@ public class ServletCutout extends HttpServlet
Pol pol = Pol.parsePol(params); Pol pol = Pol.parsePol(params);
String pixels = SingleStringParam.parseSingleStringParam(params, "PIXELS"); String pixels = SingleStringParam.parseSingleStringParam(params, "PIXELS");
// disable complete file/hdu download
if( (id!=null) && (pos==null) && (band==null) && (time==null) && (pol==null)
&& (pixels==null))
{
throw new IllegalArgumentException("At least one of filtering args must be given.");
}
String respFormat = sodaReq_getResponseFormat(request, DEFAULT_RESPONSEFORMAT); String respFormat = sodaReq_getResponseFormat(request, DEFAULT_RESPONSEFORMAT);
LOGGER.finest("responseFormat: " + respFormat); LOGGER.finest("responseFormat: " + respFormat);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment