This little gem from the Magic module must be a bug, or what?
$parsed = parse_url($dest);
if (! $parsed) {
goaway($dest);
}
At least according to the
docs,
parse_url
will only return
false
for "seriously malformed URLs". Redirecting to it in that case seems unlikely to be what we want.