From 5ee34188f2c759af153b45ec3456d9f6532e92bc Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 1 Jul 2011 11:19:54 -0700 Subject: [PATCH] Revert bogus defer httputil.ReturnJson change. Change-Id: I92f2bf63ba86e6829e697f28417e02e72f681245 --- lib/go/camli/search/handler.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/go/camli/search/handler.go b/lib/go/camli/search/handler.go index d13679c15..2cf603284 100644 --- a/lib/go/camli/search/handler.go +++ b/lib/go/camli/search/handler.go @@ -88,8 +88,6 @@ func jsonMapList() []map[string]interface{} { func (sh *Handler) ServeHTTP(rw http.ResponseWriter, req *http.Request) { ret := jsonMap() - defer httputil.ReturnJson(rw, ret) - _ = req.Header.Get("X-PrefixHandler-PathBase") suffix := req.Header.Get("X-PrefixHandler-PathSuffix") @@ -119,6 +117,7 @@ func (sh *Handler) ServeHTTP(rw http.ResponseWriter, req *http.Request) { // TODO: discovery for the endpoints & better error message with link to discovery info ret["error"] = "Unsupported search path or method" ret["errorType"] = "input" + httputil.ReturnJson(rw, ret) } func (sh *Handler) serveRecentPermanodes(rw http.ResponseWriter, req *http.Request) {