aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/jenkinsci/plugins/bbprb/BitbucketHookReceiver.java9
1 files changed, 0 insertions, 9 deletions
diff --git a/src/main/java/org/jenkinsci/plugins/bbprb/BitbucketHookReceiver.java b/src/main/java/org/jenkinsci/plugins/bbprb/BitbucketHookReceiver.java
index 355a901..1757343 100644
--- a/src/main/java/org/jenkinsci/plugins/bbprb/BitbucketHookReceiver.java
+++ b/src/main/java/org/jenkinsci/plugins/bbprb/BitbucketHookReceiver.java
@@ -32,7 +32,6 @@ public class BitbucketHookReceiver
extends CrumbExclusion implements UnprotectedRootAction {
private static final String BITBUCKET_HOOK_URL = "bbprb-hook";
- private static final String BITBUCKET_UA = "Bitbucket-Webhooks/2.0";
@Override
public boolean process(HttpServletRequest req, HttpServletResponse resp,
@@ -49,14 +48,6 @@ public class BitbucketHookReceiver
public void doIndex(StaplerRequest req, StaplerResponse resp)
throws IOException {
- String userAgent = req.getHeader("user-agent");
- if (!BITBUCKET_UA.equals(userAgent)) {
- LOGGER.log(Level.WARNING, "Bad user agent: `{0}`, expected `{1}`",
- new Object[] {userAgent, BITBUCKET_UA});
- resp.setStatus(StaplerResponse.SC_BAD_REQUEST);
- return;
- }
-
String uri = req.getRequestURI();
if (!uri.contains("/" + BITBUCKET_HOOK_URL + "/")) {
LOGGER.log(Level.WARNING,