Fix server crash when no local plugins provided
Bug: Issue 6579 Change-Id: I9e90d21f868967097a533cefd6dba4b5260b6956
This commit is contained in:
parent
0235864ef7
commit
653b6bc769
@ -122,6 +122,9 @@ func patchResponse(r *http.Request, res *http.Response) io.Reader {
|
||||
}
|
||||
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user