go-spatial / tegola

Tegola is a Mapbox Vector Tile server written in Go
http://tegola.io/
MIT License
1.3k stars 197 forks source link

Issue 994 malformed hostnames #1004

Closed ARolek closed 3 months ago

ARolek commented 4 months ago

Though this PR has a lot of code changes, a lot of them are clean up, adding consts, and formatting. The material changes are as follows:

Overall, it's a lot of code, but I got frustrated with the state of things and deemed a refactor necessary.

coveralls commented 4 months ago

Pull Request Test Coverage Report for Build 1919ce1db

Details


Changes Missing Coverage Covered Lines Changed/Added Lines %
server/handle_map_style.go 7 8 87.5%
server/handle_capabilities.go 26 28 92.86%
server/server.go 5 7 71.43%
cmd/tegola_lambda/main.go 0 3 0.0%
server/errors.go 0 3 0.0%
cmd/tegola/cmd/server.go 0 4 0.0%
internal/env/parse.go 9 13 69.23%
internal/env/types.go 10 16 62.5%
server/tile_url_template.go 69 77 89.61%
config/errors.go 0 11 0.0%
<!-- Total: 145 189 76.72% -->
Files with Coverage Reduction New Missed Lines %
cmd/tegola_lambda/main.go 1 0.0%
<!-- Total: 1 -->
Totals Coverage Status
Change from base Build a58cd8965: 0.3%
Covered Lines: 7030
Relevant Lines: 16419

💛 - Coveralls
dBitech commented 3 months ago

I took some time to test this out and seems to function as advertised. Look forward to it's commit bit

ARolek commented 3 months ago

@gdey / @iwpnd I have added another commit which implemented a new config type: env.URL. This removes the need for the URL parsing to happen at latter stages. I have tagged you two for re-review when you have a min.