made the wsgi handler more forgiving if the contents sent cannot be properly decoded