From e7e90bd60e6236de1318daba277b8788c9809f27 Mon Sep 17 00:00:00 2001 From: Luke Faraone Date: Fri, 6 Dec 2013 17:51:16 -0500 Subject: [PATCH] Specify client in User-agent in our Jira integration. (imported from commit e436478c6fd2836c06faa90ddb1ca5641d3f61e4) --- integrations/jira/org/humbug/jira/ZulipListener.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integrations/jira/org/humbug/jira/ZulipListener.groovy b/integrations/jira/org/humbug/jira/ZulipListener.groovy index cc53d9a..f105e6b 100644 --- a/integrations/jira/org/humbug/jira/ZulipListener.groovy +++ b/integrations/jira/org/humbug/jira/ZulipListener.groovy @@ -103,6 +103,8 @@ class ZulipListener extends AbstractIssueEventListener { String post(String method, NameValuePair[] parameters) { PostMethod post = new PostMethod(zulipUrl(method)) post.setRequestHeader("Content-Type", post.FORM_URL_ENCODED_CONTENT_TYPE) + // TODO: Include more useful data in the User-agent + post.setRequestHeader("User-agent", "ZulipJira/0.1") try { post.setRequestBody(parameters) HttpClient client = new HttpClient() @@ -134,7 +136,6 @@ class ZulipListener extends AbstractIssueEventListener { String sendStreamMessage(String stream, String subject, String message) { NameValuePair[] body = [new NameValuePair("api-key", zulipAPIKey), new NameValuePair("email", zulipEmail), - new NameValuePair("client", "jira-groovy"), new NameValuePair("type", "stream"), new NameValuePair("to", stream), new NameValuePair("subject", subject),