Observed on LGTM: https://lgtm.com/projects/g/caddyserver/caddy/snapshot/d8e8a8ca215a4ed7b519656ecbe3c081cd1a840a/files/modules/caddyhttp/rewrite/caddyfile.go?sort=name&dir=ASC&mode=heatmap#x5ef0d8f84bad448a:1 The read operation that is referred to by the alert is guarded by a later length check.