Throw an actual HTTP error if hostname is not provided. Fix #3.