From 7e448fe05e7fe0ccbfa41e706e358e7ba365b2dc Mon Sep 17 00:00:00 2001 From: mpl Date: Thu, 17 Jan 2013 16:54:07 +0100 Subject: [PATCH] serverconfig: remove TODOs about FindHandlerByType since its behaviour now complies with the docs Change-Id: I7ca754c0a27aa0ffc1bc1b4fe034a1c17f1876ef --- pkg/blobserver/handlers/upload.go | 1 - pkg/serverconfig/serverconfig.go | 2 -- 2 files changed, 3 deletions(-) diff --git a/pkg/blobserver/handlers/upload.go b/pkg/blobserver/handlers/upload.go index 8ee5c5b4c..fa5d7580c 100644 --- a/pkg/blobserver/handlers/upload.go +++ b/pkg/blobserver/handlers/upload.go @@ -96,7 +96,6 @@ func vivify(blobReceiver blobserver.BlobReceiveConfiger, fileblob blobref.SizedB return errors.New("blobReceiver config has no HandlerFinder") } JSONSignRoot, sh, err := hf.FindHandlerByType("jsonsign") - // TODO(mpl): second check should not be necessary, and yet it happens. Figure it out. if err != nil || sh == nil { return errors.New("jsonsign handler not found") } diff --git a/pkg/serverconfig/serverconfig.go b/pkg/serverconfig/serverconfig.go index b35a5c2b7..d108b8a28 100644 --- a/pkg/serverconfig/serverconfig.go +++ b/pkg/serverconfig/serverconfig.go @@ -170,8 +170,6 @@ func (hl *handlerLoader) GetRequestContext() (req *http.Request, ok bool) { return hl.context, hl.context != nil } -// TODO(mpl): investigate bug: when I used it to find /sighelper/ within -// makeCamliHandler, it returned "/sighelper", nil, nil. func (hl *handlerLoader) FindHandlerByType(htype string) (prefix string, handler interface{}, err error) { for prefix, config := range hl.config { if config.htype == htype {