Fix proxy upstream parser issue and add test cases (#263)

This fix tries to fix 261 where proxy upstream parser is not
able to parse upstream correctly.

Several test cases have also been added to cover the changes
and prevent regression in the future.

This fix fixes 261.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
Yong Tang 2016-09-16 23:49:35 -07:00 committed by Miek Gieben
parent 50d47a55a2
commit ed907d3327
3 changed files with 80 additions and 3 deletions

View file

@ -15,7 +15,7 @@ func init() {
}
func setup(c *caddy.Controller) error {
upstreams, err := NewStaticUpstreams(c.Dispenser)
upstreams, err := NewStaticUpstreams(&c.Dispenser)
if err != nil {
return middleware.Error("proxy", err)
}