Ensure we're reading the response from the Jersey client to cleanly close the response

Otherwise we'll litter our webserver with errors like:

    localhost - - [02/Jan/2015:10:42:49 PST] "POST /mailbox HTTP/1.1" 200 2
    - -> /mailbox
    [2015-01-02 10:42:49] ERROR Errno::ECONNRESET: Connection reset by peer @ io_fillbuf - fd:10
            /home/tyler/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:80:in `eof?'
            /home/tyler/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/httpserver.rb:80:in `run'
            /home/tyler/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread'
This commit is contained in:
R. Tyler Croy 2015-01-02 12:14:28 -08:00
parent d6c6f56b16
commit 763e29a7a8
15 changed files with 43 additions and 41 deletions

View File

@ -10,7 +10,7 @@ apply plugin: 'eclipse'
group = 'com.github.lookout'
version = '0.1.1'
version = '0.1.2'
description = 'A server-side webhook publishing library'
sourceCompatibility = '1.6'

View File

@ -6,9 +6,9 @@
<html>
<head>
<!-- Generated by groovydoc (2.3.9) on Wed Dec 31 12:40:46 PST 2014 -->
<title>AbstractHookQueue (whoas 0.1.0 API)</title>
<meta name="date" content="2014-12-31">
<!-- Generated by groovydoc (2.3.9) on Fri Jan 02 12:14:16 PST 2015 -->
<title>AbstractHookQueue (whoas 0.1.2 API)</title>
<meta name="date" content="2015-01-02">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">
@ -17,7 +17,7 @@
<body class="center">
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="AbstractHookQueue (whoas 0.1.0 API)";
parent.document.title="AbstractHookQueue (whoas 0.1.2 API)";
}
//-->
</script>

View File

@ -6,9 +6,9 @@
<html>
<head>
<!-- Generated by groovydoc (2.3.9) on Wed Dec 31 12:40:46 PST 2014 -->
<title>AbstractHookRunner (whoas 0.1.0 API)</title>
<meta name="date" content="2014-12-31">
<!-- Generated by groovydoc (2.3.9) on Fri Jan 02 12:14:16 PST 2015 -->
<title>AbstractHookRunner (whoas 0.1.2 API)</title>
<meta name="date" content="2015-01-02">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">
@ -17,7 +17,7 @@
<body class="center">
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="AbstractHookRunner (whoas 0.1.0 API)";
parent.document.title="AbstractHookRunner (whoas 0.1.2 API)";
}
//-->
</script>

View File

@ -6,9 +6,9 @@
<html>
<head>
<!-- Generated by groovydoc (2.3.9) on Wed Dec 31 12:40:46 PST 2014 -->
<title>HookRequest (whoas 0.1.0 API)</title>
<meta name="date" content="2014-12-31">
<!-- Generated by groovydoc (2.3.9) on Fri Jan 02 12:14:17 PST 2015 -->
<title>HookRequest (whoas 0.1.2 API)</title>
<meta name="date" content="2015-01-02">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">
@ -17,7 +17,7 @@
<body class="center">
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="HookRequest (whoas 0.1.0 API)";
parent.document.title="HookRequest (whoas 0.1.2 API)";
}
//-->
</script>

View File

@ -6,9 +6,9 @@
<html>
<head>
<!-- Generated by groovydoc (2.3.9) on Wed Dec 31 12:40:46 PST 2014 -->
<title>InMemoryQueue (whoas 0.1.0 API)</title>
<meta name="date" content="2014-12-31">
<!-- Generated by groovydoc (2.3.9) on Fri Jan 02 12:14:17 PST 2015 -->
<title>InMemoryQueue (whoas 0.1.2 API)</title>
<meta name="date" content="2015-01-02">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">
@ -17,7 +17,7 @@
<body class="center">
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="InMemoryQueue (whoas 0.1.0 API)";
parent.document.title="InMemoryQueue (whoas 0.1.2 API)";
}
//-->
</script>

View File

@ -6,9 +6,9 @@
<html>
<head>
<!-- Generated by groovydoc (2.3.9) on Wed Dec 31 12:40:46 PST 2014 -->
<title>Publisher (whoas 0.1.0 API)</title>
<meta name="date" content="2014-12-31">
<!-- Generated by groovydoc (2.3.9) on Fri Jan 02 12:14:17 PST 2015 -->
<title>Publisher (whoas 0.1.2 API)</title>
<meta name="date" content="2015-01-02">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">
@ -17,7 +17,7 @@
<body class="center">
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Publisher (whoas 0.1.0 API)";
parent.document.title="Publisher (whoas 0.1.2 API)";
}
//-->
</script>

View File

@ -6,9 +6,9 @@
<html>
<head>
<!-- Generated by groovydoc (2.3.9) on Wed Dec 31 12:40:46 PST 2014 -->
<title>SequentialHookRunner (whoas 0.1.0 API)</title>
<meta name="date" content="2014-12-31">
<!-- Generated by groovydoc (2.3.9) on Fri Jan 02 12:14:17 PST 2015 -->
<title>SequentialHookRunner (whoas 0.1.2 API)</title>
<meta name="date" content="2015-01-02">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../../../groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="../../../../groovy.ico" type="image/x-icon" rel="icon">
@ -17,7 +17,7 @@
<body class="center">
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="SequentialHookRunner (whoas 0.1.0 API)";
parent.document.title="SequentialHookRunner (whoas 0.1.2 API)";
}
//-->
</script>

View File

@ -2,7 +2,7 @@
<html>
<head>
<title>com.github.lookout.whoas (whoas 0.1.0 API)</title>
<title>com.github.lookout.whoas (whoas 0.1.2 API)</title>
<meta name="keywords" content="com.github.lookout.whoas package">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" title="Style">
@ -11,7 +11,7 @@
<script type="text/javascript">
function windowTitle()
{
parent.document.title="com.github.lookout.whoas (whoas 0.1.0 API)";
parent.document.title="com.github.lookout.whoas (whoas 0.1.2 API)";
}
</script>
<noscript>

View File

@ -4,8 +4,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Generated by groovydoc (2.3.9) on -->
<title>Deprecated API (whoas 0.1.0 API)</title>
<meta name="date" content="2014-12-31">
<title>Deprecated API (whoas 0.1.2 API)</title>
<meta name="date" content="2015-01-02">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
<link href="groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="groovy.ico" type="image/x-icon" rel="icon">
@ -14,7 +14,7 @@
<body class="center">
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Deprecated API (whoas 0.1.0 API)";
parent.document.title="Deprecated API (whoas 0.1.2 API)";
}
//-->
</script>

View File

@ -5,16 +5,16 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Generated by groovydoc (2.3.9) on -->
<title>API Help (whoas 0.1.0 API)</title>
<title>API Help (whoas 0.1.2 API)</title>
<link href="groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="groovy.ico" type="image/x-icon" rel="icon">
<meta name="date" content="2014-12-31">
<meta name="date" content="2015-01-02">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body class="center">
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="API Help (whoas 0.1.0 API)";
parent.document.title="API Help (whoas 0.1.2 API)";
}
//-->
</script>

View File

@ -4,14 +4,14 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!-- Generated by groovydoc (2.3.9) on -->
<title>Index (whoas 0.1.0 API)</title>
<meta name="date" content="2014-12-31">
<title>Index (whoas 0.1.2 API)</title>
<meta name="date" content="2015-01-02">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body class="center">
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Index (whoas 0.1.0 API)";
parent.document.title="Index (whoas 0.1.2 API)";
}
//-->
</script>

View File

@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>Index (whoas 0.1.0 API)</title>
<title>Index (whoas 0.1.2 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="groovy.ico" type="image/x-icon" rel="shortcut icon">
<link href="groovy.ico" type="image/x-icon" rel="icon">

View File

@ -1,7 +1,7 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Overview (whoas 0.1.0 API)</title>
<title>Overview (whoas 0.1.2 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="keywords" content="Overview">

View File

@ -2,7 +2,7 @@
<html>
<head>
<title>Overview (whoas 0.1.0 API)</title>
<title>Overview (whoas 0.1.2 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="keywords" content="Overview">
<link rel ="stylesheet" type="text/css" href="stylesheet.css" title="Style">
@ -12,7 +12,7 @@
<body class="center">
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Overview (whoas 0.1.0 API)";
parent.document.title="Overview (whoas 0.1.2 API)";
}
//-->
</script>
@ -46,7 +46,7 @@ if (location.href.indexOf('is-external=true') == -1) {
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 class="title">whoas 0.1.0 API</h1>
<h1 class="title">whoas 0.1.2 API</h1>
</div>
<div class="header">

View File

@ -40,6 +40,8 @@ class Publisher {
Invocation inv = buildInvocationFrom(request)
try {
response = inv.invoke()
/* LOG: response */
String responseBody = response.readEntity(String.class)
}
catch (ProcessingException exc) {
/* LOG: warn on this exception */