Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParseListen may set the wrong protocol #157

Closed
magiconair opened this issue Sep 9, 2016 · 1 comment
Closed

ParseListen may set the wrong protocol #157

magiconair opened this issue Sep 9, 2016 · 1 comment
Labels
Milestone

Comments

@magiconair
Copy link
Contributor

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.

@magiconair magiconair added the bug label Sep 9, 2016
@magiconair magiconair added this to the 1.3.1 milestone Sep 9, 2016
magiconair added a commit that referenced this issue Sep 9, 2016
The config.parseListen() function does not take into account
that a map is iterated in random order. Configuring the 'cs'
option also sets the protocol to 'https' which may override
the 'proto' option or vice versa. This patch fixes that
behavior.
@magiconair
Copy link
Contributor Author

Release v1.3.1 is released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant