Make sure headers are only set to str - makes sure the client always gets a response
NotADirectoryError also means a 404