caddy/caddytest/integration
Francis Lavoie a58f240d3e
httpcaddyfile: Fix #4640 (auto-HTTPS edgecase) (#4661)
Guh, this is complicated.

Fixes #4640

This also follows up on #4398 (reverting it) which made a change that technically worked, but was incorrect. It changed the condition in `hostsFromKeysNotHTTP` from `&&` to `||`, but then the function no longer did what its name said it would do, and it would return hosts even if they were marked with `http://`, if they used a non-HTTP port. That wasn't the intent of it. The test added in there was kept though, because it is a valid usecase.

The actual fix is to check _earlier_ whether all the addresses explicitly have `http://`, and if so we can short circuit and skip considering the rest.
2022-03-24 22:54:03 -06:00
..
caddyfile_adapt httpcaddyfile: Fix #4640 (auto-HTTPS edgecase) (#4661) 2022-03-24 22:54:03 -06:00
testdata caddyfile: Add args on imports (#3423) 2020-06-01 10:43:06 -06:00
autohttps_test.go caddyhttp: Fix edgecase with auto HTTP->HTTPS logic (#4243) 2021-07-14 10:49:34 -06:00
caddyfile_adapt_test.go Move from deprecated ioutil to os and io packages (#4364) 2021-09-29 11:17:48 -06:00
caddyfile_test.go refactored caddytest helpers (#3285) 2020-04-27 13:23:46 +12:00
handler_test.go browse: align template to struct field renames from 4940325 (#3706) 2020-09-08 10:45:48 -06:00
map_test.go map: Accept regex substitution in outputs (#3991) 2021-03-10 14:22:33 -07:00
reverseproxy_test.go Move from deprecated ioutil to os and io packages (#4364) 2021-09-29 11:17:48 -06:00
sni_test.go map: Reimplement; multiple outputs; optimize 2020-10-02 14:23:56 -06:00
stream_test.go Move from deprecated ioutil to os and io packages (#4364) 2021-09-29 11:17:48 -06:00