Thanks.
The problem is that the m3u file from the server has its contents base64 encoded.
wget or Kodi or most programs that deal with m3u files decode it automatically back to a normal m3u file.
TVHeadend doesn't for some reason.
The url has a query string at the end but I don't think that is the problem.
The url response header is:
HTTP/1.1 200 OK
Server: nginx
Content-Type: audio/mpegurl
Transfer-Encoding: chunked
Cache-Control: no-cache, private
Date: Tue, 24 Apr 2018 17:04:52 GMT
The response payload is an m3u8 file encoded as base64.
It must be some kind of mpegurl standard but I hadn't come across it before.