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
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -263,6 +263,13 @@ public class ServletCutout extends HttpServlet
            Pol    pol  = Pol.parsePol(params);
            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);

            LOGGER.finest("responseFormat: " + respFormat);