Skip to content
Permalink
Browse files
[FIXED JENKINS-17944] Check, if method was executed before reading st…
…atus
  • Loading branch information
vjuranek committed May 14, 2013
1 parent 360a455 commit f4f30c145aba4e87551fb5ac8a7c88e96fa2aec6
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/main/java/hudson/plugins/build_publisher/PublisherThread.java
@@ -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;

0 comments on commit f4f30c1

Please sign in to comment.