| commit | 653b6bc769811edd72aaaed332cf0dc1e43d6de2 | [log] [tgz] |
|---|---|---|
| author | Viktar Donich <viktard@google.com> | Tue Jun 27 09:42:22 2017 -0700 |
| committer | Viktar Donich <viktard@google.com> | Tue Jun 27 09:42:22 2017 -0700 |
| tree | 5c696f8d638c1db2b2b474530c8bad9b1294e10d | |
| parent | 0235864ef7a8faa74f2b6c677fde89b267db9c52 [diff] [blame] |
Fix server crash when no local plugins provided Bug: Issue 6579 Change-Id: I9e90d21f868967097a533cefd6dba4b5260b6956
diff --git a/polygerrit-ui/server.go b/polygerrit-ui/server.go index f2a97bf..a42acc3 100644 --- a/polygerrit-ui/server.go +++ b/polygerrit-ui/server.go
@@ -122,6 +122,9 @@ } func injectLocalPlugins(r io.Reader) io.Reader { + if len(*plugins) == 0 { + return r + } // Skip escape prefix io.CopyN(ioutil.Discard, r, 5) dec := json.NewDecoder(r)