Skip to content

ParseListen may set the wrong protocol #157

@magiconair

Description

@magiconair

I've noticed TestParseListen is causing some of the Travis CI flickering showing the following error:

goroutine 24 [running]:
panic(0x645580, 0xc420012120)
    /home/travis/.gimme/versions/go1.7.1.linux.amd64/src/runtime/panic.go:500 +0x1a1
testing.tRunner.func1(0xc420074480)
    /home/travis/.gimme/versions/go1.7.1.linux.amd64/src/testing/testing.go:579 +0x25d
panic(0x645580, 0xc420012120)
    /home/travis/.gimme/versions/go1.7.1.linux.amd64/src/runtime/panic.go:458 +0x243
github.com/eBay/fabio/config.TestParseListen(0xc420074480)
    /home/travis/gopath/src/github.com/eBay/fabio/config/load_test.go:301 +0x28d
testing.tRunner(0xc420074480, 0x6aecf8)
    /home/travis/.gimme/versions/go1.7.1.linux.amd64/src/testing/testing.go:610 +0x81
created by testing.(*T).Run
    /home/travis/.gimme/versions/go1.7.1.linux.amd64/src/testing/testing.go:646 +0x2ec
FAIL    github.com/eBay/fabio/config    0.007s

This error is caused by a bug in parseListen() which does not take into account that map are iterated in random order. The parse code which sets a certificate store also sets the protocol to https but that may be overridden by a proto= directive or vice versa depending on the order of the key iteration. I'll push a v1.3.1 soon to fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions