juju/utils — pull request #76 by rogpeppe (2014-10-28 10:40:57+00:00)
Title: jsonhttp: safer handlers

Two fixes to make things safer from corrupt output.

1) We change HandleJSON so that its handlers no longer
get access to the http.ResponseWriter, which means they
can't mix the normal JSON output up with other output.

2) We change HandleErrors so that it doesn't attempt
to write an error if the headers have already been written.