Skip to content

Commit

Permalink
[FIXED JENKINS-17944] Check, if method was executed before reading st…
Browse files Browse the repository at this point in the history
…atus
  • Loading branch information
vjuranek committed May 14, 2013
1 parent 360a455 commit f4f30c1
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -289,6 +289,11 @@ private boolean urlExists(String url) throws ServerFailureException, IOException
executeMethod(method);
return true;
} catch (ServerFailureException e) {
// check, if method was executed, see JENKINS-17944
if(e.getMethod().getStatusLine() == null) {
throw e;
}

int statusCode = e.getMethod().getStatusCode();
if ((statusCode == 400) || (statusCode == 404))
return false;
Expand Down

0 comments on commit f4f30c1

Please sign in to comment.