Skip to content
Snippets Groups Projects
Commit 94b00c57 authored by gmantele's avatar gmantele
Browse files

[UWS] Fix bug in UWSServlet: the destroyJob action in POST must be tested...

[UWS] Fix bug in UWSServlet: the destroyJob action in POST must be tested before the setJobParam action....otherwise the setJobParam action is always applied which leads to a Forbidden error when trying to destroy a job.
parent 48569a6b
No related branches found
No related tags found
No related merge requests found
......@@ -405,16 +405,16 @@ public abstract class UWSServlet extends HttpServlet implements UWS, UWSFactory
uwsAction = UWSAction.SET_UWS_PARAMETER;
doSetUWSParameter(requestUrl, req, resp, user);
}// SET JOB PARAMETER:
else if (requestUrl.hasJobList() && requestUrl.hasJob() && (!requestUrl.hasAttribute() || requestUrl.getAttributes().length == 1 && requestUrl.getAttributes()[0].equalsIgnoreCase(UWSJob.PARAM_PARAMETERS)) && UWSToolBox.getNbParameters(req) > 0){
uwsAction = UWSAction.SET_JOB_PARAM;
doSetJobParam(requestUrl, req, resp, user);
}// DESTROY JOB:
else if (requestUrl.hasJobList() && requestUrl.hasJob() && UWSToolBox.hasParameter(UWSJob.PARAM_ACTION, UWSJob.ACTION_DELETE, req, false)){
uwsAction = UWSAction.DESTROY_JOB;
doDestroyJob(requestUrl, req, resp, user);
}// SET JOB PARAMETER:
else if (requestUrl.hasJobList() && requestUrl.hasJob() && (!requestUrl.hasAttribute() || requestUrl.getAttributes().length == 1 && requestUrl.getAttributes()[0].equalsIgnoreCase(UWSJob.PARAM_PARAMETERS)) && UWSToolBox.getNbParameters(req) > 0){
uwsAction = UWSAction.SET_JOB_PARAM;
doSetJobParam(requestUrl, req, resp, user);
}else
throw new UWSException(UWSException.NOT_IMPLEMENTED, "Unknown UWS action!");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment