Another try...move int outside the check for m3u8 since it might be looking for either that, or a .ts segment.  In either instance, something like a 400 error is a done deal.