use length limited _strnchr in mime_match
make path utf-8
reduce objects created in response header