summaryrefslogtreecommitdiff
path: root/input/http
diff options
context:
space:
mode:
Diffstat (limited to 'input/http')
-rw-r--r--input/http/http.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/input/http/http.go b/input/http/http.go
index 87ec0f9..61e2c39 100644
--- a/input/http/http.go
+++ b/input/http/http.go
@@ -50,10 +50,13 @@ func (hi *HTTPInput) httphandler(w http.ResponseWriter, r *http.Request) {
return
}
all, err := ioutil.ReadAll(r.Body)
+ wrk := &work.Work{Data: all}
if err != nil {
fmt.Printf("Error when reading HTTP request body: %q\n", err)
+ wrk.SetError(err)
}
- hi.retchan <- &work.Work{Data: all, Err: err}
+
+ hi.retchan <- wrk
}
func (hi *HTTPInput) Start() chan *work.Work {