diff --git a/vendor/github.com/prometheus/common/expfmt/text_parse.go b/vendor/github.com/prometheus/common/expfmt/text_parse.go index 84433bc4f..bd170b167 100644 --- a/vendor/github.com/prometheus/common/expfmt/text_parse.go +++ b/vendor/github.com/prometheus/common/expfmt/text_parse.go @@ -108,6 +108,13 @@ func (p *TextParser) TextToMetricFamilies(in io.Reader) (map[string]*dto.MetricF delete(p.metricFamiliesByName, k) } } + // If p.err is io.EOF now, we have run into a premature end of the input + // stream. Turn this error into something nicer and more + // meaningful. (io.EOF is often used as a signal for the legitimate end + // of an input stream.) + if p.err == io.EOF { + p.parseError("unexpected end of input stream") + } return p.metricFamiliesByName, p.err } diff --git a/vendor/vendor.json b/vendor/vendor.json index f2405ebab..8cfe49543 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -159,8 +159,8 @@ }, { "path": "github.com/prometheus/common/expfmt", - "revision": "56b90312e937d43b930f06a59bf0d6a4ae1944bc", - "revisionTime": "2015-12-09T21:44:25+01:00" + "revision": "23070236b1ebff452f494ae831569545c2b61d26", + "revisionTime": "2016-02-11T16:03:55+01:00" }, { "path": "github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg",