Any host that would do this is not worth having, to be candid. There’s zero reason for this other than a lack of understanding on the host’s part.
If you have the technical know-how I’d recommend a cheap VPS. The cost is only a bit more each month and it’ll save you this type of aggravation, not to mention your stuff will probably run better. Otherwise there are some good shared hosts out there that probably won’t meddle unless there’s a real issue (email abuse, outbound attacks, malware hosting, etc.).
(I mean, the response code isn’t even a good one if they felt this script was an issue.)