goss-org / goss

Quick and Easy server testing/validation
https://goss.rocks
Apache License 2.0
5.55k stars 473 forks source link

http resource - Host header not set #564

Closed johnk-novu closed 4 years ago

johnk-novu commented 4 years ago

Describe the bug Go's net/http library excludes/skips setting certain request headers, including Host.

How To Reproduce Write a goss test that relies on a host header being set. See https://gist.github.com/johnk-novu/fd3671819c59da227296c54ef393411c for example.

Expected Behavior Host header is presented to the webserver.

Actual Behavior No Host header(s) are presented to the webserver.

Environment:

johnk-novu commented 4 years ago

PR in the works, will re-target to this repo when it is closer to being "ready"

https://github.com/johnk-novu/goss/pull/1

johnk-novu commented 4 years ago

PR open https://github.com/aelsabbahy/goss/pull/565

Struggling to get test running locally due to some laptop issues, getting Go setup on another machine to run tests.

johnk-novu commented 4 years ago

Confirmed make test-all passes. PR should be good to go.

aelsabbahy commented 4 years ago

Closed by #565