You could maybe delay the import mapping. Use a System.HttpRequest as input parameter in the flow that you use in your published service, then create a string variable where you delete the line and then use your import mapping on the string variable.
Delete the line e.g. by
replaceFirst($httpRequest/Content, '<!DOCTYPE.*>', '')