fix wsgi hostname reconstruction