• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

couchbase / cbgt / 312 / 1
54%
master: 54%

Build:
DEFAULT BRANCH: master
Ran 19 Feb 2018 09:10PM UTC
Files 58
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Feb 2018 09:08PM UTC coverage: 54.65% (-0.02%) from 54.665%
312.1

push

travis-ci

abhinavdangeti
<a href="https://github.com/couchbase/cbgt/commit/<a class=hub.com/couchbase/cbgt/commit/2aaaf3336fdc4f9c1f91791554b8231fc6196aa3">2aaaf3336<a href="https://github.com/couchbase/cbgt/commit/2aaaf3336fdc4f9c1f91791554b8231fc6196aa3">&quot;&gt;MB-24249: Avoid handlers writing http response headers twice

When encoding/json&amp;#39;s NewEncoder()&amp;#39;s Encode is invoked, for smaller
responses the API succeeds and does not return a non-nil error.
However in case of larger responses, an error is seen sometimes:

    &amp;quot;write tcp 127.0.0.1:9200-&amp;gt;127.0.0.1:49239: write: broken pipe&amp;quot;

This is because large responses are interrupted by a timeout/deadline
set on the connection by the client, or in other cases the socket being
simply closed by the client.

Sequence of steps to produce the message &amp;quot;http: multiple
response.WriteHeader calls&amp;quot; in the logs:
1. Encode() invokes the responseWriter&amp;#39;s Write. This Write first
   invokes WriteHeader() with code 200 (per go docs) before writing
   the data on the stream. However while progress ensues in writing
   the large response, the client closes the connection which interrupts
   the server.
2. Encode() therefore returns a non-nil error because of the client
   interruption, and thus invokes WriteHeader() again - this time with
   the code 500, causing the log message in focus.

Since this is an error we can actually ignore, for the client has
already closed the connection and doesn&amp;#39;t really care - I recommend we
stick to the earlier cover-up fix made here:
    http://review.couchbase.org/#/c/79272/

In the current commit, I&amp;#39;m just changing the qualifier of &amp;#39;wrote&amp;#39; in
CountResponseWriter to public, so that it can be accessed in CBFT
where applicable.

Change-Id: I</a><a class="double-link" href="https://github.com/couchbase/cbgt/commit/<a class="double-link" href="https://github.com/couchbase/cbgt/commit/e392374d633e6206615012d4770e31be0ba026fa">e392374d6</a>">e392374d6</a><a href="https://github.com/couchbase/cbgt/commit/2aaaf3336fdc4f9c1f91791554b8231fc6196aa3">
Reviewed-on: http://review.couchbase.org/88639
Well-Formed: Build Bot &lt;build@couchbase.com>
Reviewed-by: Steve Yen <steve.yen@gmail.com>
R... (continued)

7005 of 12818 relevant lines covered (54.65%)

31.62 hits per line

Source Files on job 312.1
  • Tree
  • List 0
  • Changed 15
  • Source Changed 1
  • Coverage Changed 15
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1
  • Travis Job 312.1
  • 2aaaf333 on github
  • Prev Job for on master (#310.1)
  • Next Job for on master (#313.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc